<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>SIF Implementation Specification 2.2 - Messaging</title>
    <link rel="stylesheet" type="text/css" href="include/document.css" />
    <link rel="stylesheet" type="text/css" href="include/specification.css" />
  </head>
  <body>
    <div class="navigation" id="topnavigation">
      <a href="index.html">home</a>
      <a href="Architecture.html">previous</a>
      <a href="Infrastructure.html">next</a>
      <a href="index.html#contents">table of contents</a>
      <hr />
    </div>
    <a name="Messaging" />
    <h1>4 Messaging</h1>
    <p>This section documents the messaging and message handling protocols defined in SIF.  A messaging protocol consists of sending a <code>SIF_Message</code> 
		to initiate an operation, receiving back a <code>SIF_Ack</code>; a message handling protocol consists of processing an incoming <code>SIF_Message</code> 
		and responding with a <code>SIF_Ack</code> and possibly sending follow-up <code>SIF_Message</code>s.  This section is independent
		of transport layer details, aside from encryption and authentication level impacts associated with individual messages. 
		Unless otherwise noted, all protocols assume successful communication over the appropriate transport layer;
		agent and ZIS implementations should also be prepared to handle transport layer errors and exceptions, directly or wrapped in
		a <code>SIF_Ack/SIF_Error</code> by underlying code.
</p>
    <a name="AgentProtocols" />
    <h2>4.1 Agent Protocols</h2>
    <a name="AgentMessagingProtocols" />
    <h3>4.1.1 Agent Messaging Protocols</h3>
    <p>This section documents how Agents should send individual messages, and the resulting post-conditions upon success or failure, along with
				any necessary steps to take.  These correspond to each of the operations an Agent can initiate.</p>
    <a name="AgentMessagingSIF_Register" />
    <h4>4.1.1.1 SIF_Register</h4>
    <p>An Agent must register with the ZIS to participate in a Zone.  To do so, it sends a <code>SIF_Register</code>
					message.  An Agent may at any time re-register by sending another <code>SIF_Register</code> message.
					The ZIS updates the Agent's registered settings accordingly.</p>
    <a name="Table41111SIF_RegisterProtocol" />
    <table title="SIF_Register Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Register"><code>SIF_Message/SIF_Register</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place your Agent's name, supported versions and maximum buffer size for receiving messages
							into <code>SIF_Name</code>, <code>SIF_Version</code> and <code>SIF_MaxBufferSize</code>, respectively.
							Specify whether your Agent is Push- or Pull-mode in <code>SIF_Mode</code>.  If <code>SIF_Mode</code> is <code>Push</code>,
							specify the protocol information for the ZIS to use when delivering messages to your agent in <code>SIF_Protocol</code>;
							optional compression settings may be included in the <code>Accept-Encoding</code> <code>SIF_Protocol/SIF_Property</code>.
							If desired, supply optional information regarding your Agent and/or application in <code>SIF_NodeVendor</code>,
							<code>SIF_NodeVersion</code>, <code>SIF_Application</code> and <code>SIF_Icon</code>.
							</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent is now registered in the Zone.  The Access Control settings for your agent (<code>SIF_AgentACL</code> are in 
							<code>SIF_Status/SIF_Data</code>).</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.  Note particularly category <code>5</code>.  If an <code>Accept-Encoding</code> 
							<code>SIF_Protocol/SIF_Property</code> was specified, the ZIS may return error code <code>10</code>
							(ZIS does not support the requested <code>Accept-Encoding</code> value).  Your agent <span class="rfc2119">SHOULD</span>
							re-attempt registration without, or with another, <code>Accept-Encoding</code> value.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.1-1: SIF_Register Protocol</span>
    <a name="AgentMessagingSIF_Unregister" />
    <h4>4.1.1.2 SIF_Unregister</h4>
    <p>An Agent removes itself from a Zone by sending a <code>SIF_Unregister</code> message to the ZIS.  Successful
					completion of this operation removes all settings associated with the Agent, including the objects it is currently
					providing and subscribed to in the zone; the Agent's message queue is also deleted.  Note that a successful
					<code>SIF_Unregister</code> message may, depending on the ZIS implementation, remove access control settings that 
					have been manually configured by a Zone administrator and that may need to be re-configured for a subsequent
					successful <code>SIF_Register</code>.</p>
    <a name="Table41121SIF_UnregisterProtocol" />
    <table title="SIF_Unregister Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Unregister"><code>SIF_Message/SIF_Unregister</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent is now removed from the Zone.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.2-1: SIF_Unregister Protocol</span>
    <a name="AgentMessagingSIF_Provide" />
    <h4>4.1.1.3 SIF_Provide</h4>
    <p>An Agent registers with the ZIS to be the default Responder, or Provider, for one or more
					SIF objects in one or more contexts by sending a <a href="Infrastructure.html#SIF_Provide"><code>SIF_Provide</code></a>
					message to the ZIS.  The Agent must have access control rights at the ZIS to successfully register
					as a Provider for an object.</p>
    <p>
					Note that upon successful completion of <code>SIF_Provide</code> that your Agent is still the Provider
					of any objects for which it was previously registered as the Provider.  To unregister as the Provider
					of given objects, use <code>SIF_Unprovide</code>.  To replace all objects your Agent provides in one
					operation, use <code>SIF_Provision</code>.
					</p>
    <p>
					As of version 2.0 of this specification, <code>SIF_Provision</code> is the preferred method for registering an
					Agent as a Provider, and provisioning an Agent in general.  Support for <code>SIF_Provide</code> may be removed 
					in a future major release of this specification.
					</p>
    <a name="Table41131SIF_ProvideProtocol" />
    <table title="SIF_Provide Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Provide"><code>SIF_Message/SIF_Provide</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  For each object your Agent would like to provide, place a <code>SIF_Object</code> element with an
							<code>ObjectName</code> and optionally one or more <code>SIF_Context</code> names (which default to <code>SIF_Default</code> if omitted).
							Your Agent's support for <code>SIF_ExtendedQuery</code> can be specified in <code>SIF_ExtendedQuerySupport</code> for each object.
						</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent is now the Provider of each of the objects specified in the <code>SIF_Provide</code> message, in the
							applicable context(s).  Any request sent by an Agent for one of these objects without explicitly specifying
							a particular Responder in <code>SIF_Header/SIF_DestinationId</code> will be placed in your Agent's message queue.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.  Note particularly category <code>4</code>, code <code>3</code> (no permission to provide)
							and category <code>6</code>, code <code>4</code> (object already has a Provider).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.3-1: SIF_Provide Protocol</span>
    <a name="AgentMessagingSIF_Unprovide" />
    <h4>4.1.1.4 SIF_Unprovide</h4>
    <p>Your Agent unregisters with the ZIS as the default Responder, or Provider, for one or more
					SIF objects in one or more contexts by sending a <a href="Infrastructure.html#SIF_Unprovide"><code>SIF_Unprovide</code></a>
					message to the ZIS.  Note that any
					<code>SIF_Request</code>s for these objects already pending in your Agent's queue will still be delivered.</p>
    <p>
					As of version 2.0 of this specification, <code>SIF_Provision</code> is the preferred method for unregistering an
					Agent as a Provider, and provisioning an Agent in general.  Support for <code>SIF_Unprovide</code> may be removed 
					in a future major release of this specification.
					</p>
    <a name="Table41141SIF_UnprovideProtocol" />
    <table title="SIF_Unprovide Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Unprovide"><code>SIF_Message/SIF_Unprovide</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  For each object your Agent would like to provide, include a <code>SIF_Object</code> element with an
							<code>ObjectName</code> and optionally one or more <code>SIF_Context</code> names (which default to <code>SIF_Default</code> if omitted).</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent is no longer the Provider of each of the objects specified in the <code>SIF_Unprovide</code> message, in the
							applicable context(s).  <code>SIF_Request</code>s will no longer be routed to your Agent by default, but this
							does not prevent other Agents from sending requests directly to your Agent (if permitted by access control rights).</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.4-1: SIF_Unprovide Protocol</span>
    <a name="AgentMessagingSIF_Subscribe" />
    <h4>4.1.1.5 SIF_Subscribe</h4>
    <p>An Agent registers with the ZIS to receive <code>SIF_Event</code>s for one or more SIF objects
					in one or more contexts by sending a <a href="Infrastructure.html#SIF_Subscribe"><code>SIF_Subscribe</code></a>
					message to the ZIS.  The Agent must have access control rights at the ZIS to successfully subscribe
					to events for an object.</p>
    <p>
					Note that upon successful completion of <code>SIF_Subscribe</code> that your Agent is still subscribed to objects 
					to which it had previously subscribed.  To unregister as a Subscriber
					of given objects, use <code>SIF_Unsubscribe</code>.  To replace all objects to which your Agent subscribes in one
					operation, use <code>SIF_Provision</code>.
					</p>
    <p>
					As of version 2.0 of this specification, <code>SIF_Provision</code> is the preferred method for registering an
					Agent as a Subscriber, and provisioning an Agent in general.  Support for <code>SIF_Subscribe</code> may be removed 
					in a future major release of this specification.
					</p>
    <a name="Table41151SIF_SubscribeProtocol" />
    <table title="SIF_Subscribe Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Subscribe"><code>SIF_Message/SIF_Subscribe</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  For each object your Agent would like to subscribe to, place a <code>SIF_Object</code> element with an
							<code>ObjectName</code> and optionally one or more <code>SIF_Context</code> names (which default to <code>SIF_Default</code> if omitted).</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent is now subscribed to each of the objects specified in the <code>SIF_Subscribe</code> message, in the
							specified context(s) if included.  Any <code>SIF_Events</code> for these objects will be placed in your Agent's queue.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.  Note particularly category <code>4</code>, code <code>4</code> (no permission to subscribe).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.5-1: SIF_Subscribe Protocol</span>
    <a name="AgentMessagingSIF_Unsubscribe" />
    <h4>4.1.1.6 SIF_Unsubscribe</h4>
    <p>To stop receiving <code>SIF_Event</code>s for one or more objects in one or more contexts, an Agent sends a 
					<a href="Infrastructure.html#SIF_Unsubscribe"><code>SIF_Unsubscribe</code></a>
					message to the ZIS.  Note that if there are events already pending in your Agent's queue for these objects,
					they will still be delivered after a successful <code>SIF_Unsubscribe</code>.</p>
    <p>
					As of version 2.0 of this specification, <code>SIF_Provision</code> is the preferred method for unregistering an
					Agent as a Subscriber, and provisioning an Agent in general.  Support for <code>SIF_Unsubscribe</code> may be removed 
					in a future major release of this specification.
					</p>
    <a name="Table41161SIF_UnsubscribeProtocol" />
    <table title="SIF_Unsubscribe Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Unsubscribe"><code>SIF_Message/SIF_Unsubscribe</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  For each object your Agent would like to cease receiving events, include a <code>SIF_Object</code> element with an
							<code>ObjectName</code> and optionally one or more <code>SIF_Context</code> names (which default to <code>SIF_Default</code> if omitted).</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent is now unsubscribed from each of the objects specified in the <code>SIF_Unsubscribe</code> message, in the
							applicable context(s).  <code>SIF_Events</code> for these objects will cease to be placed in your Agent's queue.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.6-1: SIF_Unsubscribe Protocol</span>
    <a name="AgentMessagingSIF_Provision" />
    <h4>4.1.1.7 SIF_Provision</h4>
    <p>The <code>SIF_Provision</code> message provides an Agent the ability to register the objects it provides and to
					which it subscribes in a single operation, replacing whatever settings the ZIS has on record for the Agent.  In effect
					it is an alternative to <code>SIF_Provide</code>, <code>SIF_Unprovide</code>, <code>SIF_Subscribe</code> and <code>SIF_Unsubscribe</code>,
					though an Agent may choose to use this message or those, or a combination of these messages.</p>
    <p>This message also
					allows the Agent to fully describe the operations it will perform in a Zone beyond those that can be
					communicated with <code>SIF_Provide</code>
					and <code>SIF_Subscribe</code>, including the types of events it will publish, the requests to which it will respond with or without
					being the Provider for requested objects, and the objects for which it sends requests.
					</p>
    <p>
					The Agent must have the appropriate access control settings to successfully register any of the corresponding information included 
					in <code>SIF_Provision</code>.  Note that the list of access control settings can be determined by examining the <code>SIF_AgentACL</code>
					object returned in the <code>SIF_Register</code> or <code>SIF_GetAgentACL</code> message protocols.
					</p>
    <p>Note that <code>SIF_Provision</code> will also fail if the Agent is attempting to provide an object that is already provided
					by another Agent in the applicable Zone Context.  The list of Providers in a Zone can be found in <code>SIF_ZoneStatus</code>.</p>
    <p>
					As of version 2.0 of this specification, <code>SIF_Provision</code> is the preferred method for provisioning an Agent.  
					Support for <code>SIF_Subscribe</code>, <code>SIF_Unsubscribe</code>, <code>SIF_Provide</code> and <code>SIF_Unprovide</code>
					may be removed in a future major release of this specification.
					</p>
    <a name="Table41171SIF_ProvisionProtocol" />
    <table title="SIF_Provision Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
          <p>Prepare a <a href="Infrastructure.html#SIF_Provision"><code>SIF_Message/SIF_Provision</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.</p>
          <p>Include <code>SIF_ProvideObjects</code>
							and for each object your Agent would like to provide, place a <code>SIF_Object</code> element with an
							<code>ObjectName</code> and optionally one or more <code>SIF_Context</code> names (which default to <code>SIF_Default</code> if omitted).
							Your Agent can also state its support for <code>SIF_ExtendedQuery</code> in <code>SIF_ExtendedQuerySupport</code>, which
							defaults to <code>false</code>.
							</p>
          <p>Include <code>SIF_SubscribeObjects</code>
							and for each object to which your Agent would like to subscribe, place a <code>SIF_Object</code> element with an
							<code>ObjectName</code> and optionally one or more <code>SIF_Context</code> names (which default to <code>SIF_Default</code> if omitted).
							</p>
          <p>Include <code>SIF_PublishAddObjects</code>, <code>SIF_PublishChangeObjects</code> and <code>SIF_PublishDeleteObjects</code>
							elements and include a <code>SIF_Object</code> element with an <code>ObjectName</code>
								in the respective sections for each event type your agent publishes with regard to that oject.  Optionally specify for each object one or more <code>SIF_Context</code> names 
								(which default to <code>SIF_Default</code> if omitted).
							</p>
          <p>Include <code>SIF_RequestObjects</code>
							and for each object your Agent requests, place a <code>SIF_Object</code> element with an
							<code>ObjectName</code> and optionally one or more <code>SIF_Context</code> names (which default to <code>SIF_Default</code> if omitted).
							Your Agent can also state its support for <code>SIF_ExtendedQuery</code> in <code>SIF_ExtendedQuerySupport</code>, which
							defaults to <code>false</code>.
							</p>
          <p>Include <code>SIF_RespondObjects</code>
							and for each object for which your Agent processes requests (including those listed in <code>SIF_ProvideObjects</code>), 
							include a <code>SIF_Object</code> element with an
							<code>ObjectName</code> and optionally one or more <code>SIF_Context</code> names (which default to <code>SIF_Default</code> if omitted).
							Your Agent can also state its support for <code>SIF_ExtendedQuery</code> in <code>SIF_ExtendedQuerySupport</code>, which
							defaults to <code>false</code>.
							</p>
        </td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent is now registered with the corresponding settings in the Zone.  Any previously recorded settings
							with regard to the operations your Agent performs have been replaced.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.7-1: SIF_Provision Protocol</span>
    <a name="AgentMessagingSIF_Event" />
    <h4>4.1.1.8 SIF_Event</h4>
    <p>When an application adds, changes or deletes data represented in one or more Zone Contexts, its Agent <span class="rfc2119">SHOULD</span>
				publish the corresponding <code>Add</code>, <code>Change</code> or <code>Delete</code> <code>SIF_Event</code> to the Zone.  Upon
				successful delivery of a <code>SIF_Event</code> to the ZIS, the ZIS places the event in the queue for any
				Agents subscribed to events for the object, including your Agent if it is a subscriber.</p>
    <a name="Table41181SIF_EventProtocol" />
    <table title="SIF_Event Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
          <p>Prepare a <a href="Infrastructure.html#SIF_Event"><code>SIF_Message/SIF_Event</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>.  If your Agent would like to indicate minimum encryption and/or authentication requirements for Agents
							receiving this <code>SIF_Event</code>; supply <code>SIF_Security</code> with the appropriate settings; use an equally secure
							channel when communicating with the ZIS, if desired.  If this event specifically applies to one or more contexts, place
							them in <code>SIF_Contexts</code>; if omitted, the context is <code>SIF_Default</code>.
							</p>
          <p>Specify the name of the object that is being added, changed or deleted in <code>SIF_EventObject/@ObjectName</code>.  Place
							the type of event in <code>SIF_EventObject/@Action</code> and place the object in <code>SIF_EventObject</code>.  For
							an <code>Add</code> event, this <span class="rfc2119">MUST</span> be the complete object with all mandatory elements present.  If
							the agent wishes to indicate that a particular optional element is supported but has no value, the element <span class="rfc2119">MAY</span>
							be included as empty, with <code>xsi:nil</code> set to <code>true</code> if necessary.
							</p>
          <p>
							For a <code>Change</code> event, all unchanged elements, whether mandatory or optional <span class="rfc2119">SHOULD</span> be omitted
							from the object.  Optional elements that have been deleted <span class="rfc2119">MAY</span> be included as empty,
								with <code>xsi:nil</code> set to <code>true</code> if necessary.  For each list of repeatable elements in the object that has
								changed, include the whole list if the list type indicated is <code>List</code>.  If the list type is <code>ActionList</code>,
								the agent <span class="rfc2119">MAY</span> include only those elements in the list that have been added, changed or 
								deleted.  If an element has been deleted from an <code>ActionList</code>, the element <span class="rfc2119">MUST</span>
								be included with at
								least its key attribute(s) and/or element(s) specified, and include a <code>SIF_Action</code> attribute value
								of <code>Delete</code> on the deleted child element in the list.  Omitting an element in an <code>ActionList</code> indicates that it 
								has been unchanged in the event.
							</p>
          <p>
							For a <code>Delete</code> event, only elements/attributes that identify the object sufficiently for deletion <span class="rfc2119">SHOULD</span>
							be included.  This set of identifying elements/attributes are typically communicated by the mandatory root attributes of an object,
							which <span class="rfc2119">MUST</span> be included.
						</p>
        </td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>The event has been successfully received by the ZIS.  It will be placed in the queue of any Agents registered as
							subscribers to events for the given object.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.8-1: SIF_Event Protocol</span>
    <a name="AgentMessagingSIF_Request" />
    <h4>4.1.1.9 SIF_Request</h4>
    <p>An Agent can request data from another Agent at any time by sending a <code>SIF_Request</code> message.  Agents use one of two
				query mechanisms in requests.  SIF's
				default query mechanism, <code>SIF_Query</code>, is used to request objects of a given type, matching optional query conditions, optionally
				returning a subset of object elements.  <code>SIF_ExtendedQuery</code> is used to select elements from
				one or more objects, joined together, if necessary, on <code>RefId</code>-based conditions.  Before delivering a request with a 
				<code>SIF_ExtendedQuery</code> to a Responder, the ZIS checks that the Responder supports <code>SIF_ExtendedQuery</code> 
				for all referenced objects.</p>
    <a name="Table41191SIF_RequestProtocol" />
    <table title="SIF_Request Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
          <p>Prepare a <a href="Infrastructure.html#SIF_Request"><code>SIF_Message/SIF_Request</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>.
							If your Agent would like to indicate minimum encryption and/or authentication requirements for Agents
							receiving this <code>SIF_Request</code>, supply <code>SIF_Security</code> with the appropriate settings; use an equally secure
							channel when communicating with the ZIS, if desired.  If this request is associated with a context, 
							specify a single <code>SIF_Context</code> in <code>SIF_Contexts</code>; if omitted, the context is <code>SIF_Default</code>.
							If your Agent would like to 
							explicitly route this request to a given Agent, specify the Agent's ID in <code>SIF_DestinationId</code>.  
							Specify the SIF versions the responder may choose from when returning data in <code>SIF_Version</code>.
							Each version specified <span class="rfc2119">MUST</span> be registered at the ZIS as supported by your Agent.  Specify the maximum buffer
							size the Responder must respect when sending <code>SIF_Response</code> packets; this <span class="rfc2119">MUST</span> be
							less than or equal to the <code>SIF_MaxBufferSize</code> with which your Agent registered with the ZIS.
							</p>
        </td>
        <td>
          <p>If using <code>SIF_ExtendedQuery</code>, go to step 3; otherwise go to step 2.</p>
        </td>
      </tr>
      <tr>
        <td>2</td>
        <td>In <code>SIF_Query</code>, specify the object name being requested in <code>SIF_QueryObject/@ObjectName</code>.  
							Optionally specify the subset of elements/attributes to be returned from each object in 
							<code>SIF_QueryObject/SIF_Element</code>; note that parent elements of specified elements/attributes are returned as well.
							If your Agent would like to specify query matching conditions, include <a href="Infrastructure.html#SIF_ConditionGroup"><code>SIF_ConditionGroup</code></a>.  Alternately an example of an object allowed for use in query-by-example can be placed in
						 <code>SIF_Example</code>.
							</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.  Go to step 4.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Include a <a href="Infrastructure.html#SIF_ExtendedQuery"><code>SIF_ExtendedQuery</code></a>.  If your Agent did not specify
							<code>SIF_DestinationId</code>, the <code>SIF_Request</code> will be routed to the Provider for <code>SIF_From/@ObjectName</code>.
							If your Agent would like to override this routing mechanism, include <code>SIF_DestinationProvider</code> set
							to the object name for which the ZIS will determine the Provider and route the request accordingly.</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 8.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>The request has been successfully received by the ZIS.  It will be placed in the queue of the appropriate Responder
							as specified in <code>SIF_Header/SIF_DestinationId</code> or determined by <code>SIF_ExtendedQuery/SIF_From/@ObjectName</code>
							or <code>SIF_ExtendedQuery/SIF_DestinationProvider</code>.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.9-1: SIF_Request Protocol</span>
    <a name="AgentMessagingSIF_Ping" />
    <h4>4.1.1.10 SIF_Ping</h4>
    <p>
						An agent can "ping" the ZIS or check that it's online and/or "awake" by sending
						a <a href="Infrastructure.html#SIF_Ping">SIF_Ping</a> message to the ZIS.  If the agent receives
						a successful acknowledgement, the ZIS is awake; the ZIS may also reply that it is asleep.  As
						a ZIS may be offline completely, Agents should be prepared to handle transport errors directly
						or wrapped in a <code>SIF_Ack/SIF_Error</code> by underlying code.
					</p>
    <a name="Table411101SIF_PingProtocol" />
    <table title="SIF_Ping Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_SystemControl</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_Ping"><code>SIF_Ping</code></a>
								element in <code>SIF_SystemControlData</code>.
							</td>
        <td>
								Send <code>SIF_Message</code> to ZIS over appropriate transport.
							</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.
								Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?
							</td>
        <td>If yes, go to Step 8.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>0</code>?
							</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								The ZIS is awake.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>8</code> (ZIS is asleep)?
							</td>
        <td>If no, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>
								The ZIS is asleep.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>7</td>
        <td>
								Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
								<code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>8</td>
        <td>
								Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.10-1: SIF_Ping Protocol</span>
    <a name="AgentMessagingSIF_Sleep" />
    <h4>4.1.1.11 SIF_Sleep</h4>
    <p>A Push-mode Agent can send 
					a <a href="Infrastructure.html#SIF_Sleep">SIF_Sleep</a> message to the ZIS to change its state
					to "asleep," indicating that the ZIS should not send the Agent messages until it "wakes up"
					by sending a <code>SIF_Wakeup</code> message or re-registering with <code>SIF_Register</code>.
					A Pull-mode Agent can also changes it state to "sleeping," but this has no effect other than indicating
					to other Agents via <code>SIF_ZoneStatus</code> that it is "sleeping" and not processing messages in its queue.
					Sending a <code>SIF_Wakeup</code> or <code>SIF_GetMessage</code> will indicate that the Agent is "awake,"
					as will re-registering with <code>SIF_Register</code>.</p>
    <a name="Table411111SIF_SleepProtocol" />
    <table title="SIF_Sleep Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_Sleep"><code>SIF_Sleep</code></a>
							element in <code>SIF_SystemControlData</code>.</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent's state has been set to "asleep" in the ZIS.  This is reflected to other Agents
							in <code>SIF_ZoneStatus</code> and if your Agent is a Push-mode Agent, the ZIS will stop
							delivering messages to your Agent.  To "wake up," send a <code>SIF_Wakeup</code> message, or re-register
							with <code>SIF_Register</code>.  Pull-mode Agents may also send <code>SIF_GetMessage</code>.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.11-1: SIF_Sleep Protocol</span>
    <a name="AgentMessagingSIF_Wakeup" />
    <h4>4.1.1.12 SIF_Wakeup</h4>
    <p>An Agent can send 
					a <a href="Infrastructure.html#SIF_Wakeup"><code>SIF_Wakeup</code></a> message to the ZIS to change its state to "awake," whether sleeping
					or not; this state is available to other Agents via <a href="Infrastructure.html#SIF_ZoneStatus"><code>SIF_ZoneStatus</code></a>.
					Upon success, the ZIS may begin delivering messages to a Push-mode Agent again, if previously sleeping.</p>
    <a name="Table411121SIF_WakeupProtocol" />
    <table title="SIF_Wakeup Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_Wakeup"><code>SIF_Wakeup</code></a>
							element in <code>SIF_SystemControlData</code>.</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Your Agent's state has been set to "awake" in the ZIS.  This is reflected to other Agents
							in <code>SIF_ZoneStatus</code> and if your Agent is a Push-mode Agent and it was previously
							asleep, the ZIS will resume delivering messages to your Agent.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.12-1: SIF_Wakeup Protocol</span>
    <a name="AgentMessagingSIF_GetZoneStatus" />
    <h4>4.1.1.13 SIF_GetZoneStatus</h4>
    <p>To retrieve the current status of the Zone (<a href="Infrastructure.html#SIF_ZoneStatus"><code>SIF_ZoneStatus</code></a>), 
					send a <a href="Infrastructure.html#SIF_GetZoneStatus"><code>SIF_GetZoneStatus</code></a> message to the ZIS.</p>
    <a name="Table411131SIF_GetZoneStatusProtocol" />
    <table title="SIF_GetZoneStatus Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_GetZoneStatus"><code>SIF_GetZoneStatus</code></a>
							element in <code>SIF_SystemControlData</code>.</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
          <code>SIF_Status/SIF_Data</code> contains the current status of the Zone in <code>SIF_ZoneStatus</code>.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.13-1: SIF_GetZoneStatus Protocol</span>
    <a name="AgentMessagingSIF_GetAgentACL" />
    <h4>4.1.1.14 SIF_GetAgentACL</h4>
    <p>To retrieve your Agent's current access control list settings from the ZIS (<a href="Infrastructure.html#SIF_AgentACL"><code>SIF_AgentACL</code></a>), send a <a href="Infrastructure.html#SIF_GetAgentACL"><code>SIF_GetAgentACL</code></a> message to the ZIS.</p>
    <a name="Table411141SIF_GetAgentACLProtocol" />
    <table title="SIF_GetAgentACL Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_GetAgentACL"><code>SIF_GetAgentACL</code></a>
							element in <code>SIF_SystemControlData</code>.</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
          <code>SIF_Status/SIF_Data</code> contains your Agent's current access control list settings in the Zone in 
							<code>SIF_AgentACL</code>.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.14-1: SIF_GetAgentACL Protocol</span>
    <a name="AgentMessagingSIF_CancelRequests" />
    <h4>4.1.1.15 SIF_CancelRequests</h4>
    <p>Agents can request that a ZIS cancel <code>SIF_Request</code>s, pending or in process, by sending a list
					of <code>SIF_RequestMsgId</code>s in a <code>SIF_CancelRequests</code> message.  If an Agent abandons or restarts a data
					collection using <code>SIF_Request</code>s, whether or not the response stream has started, it is <span class="rfc2119">RECOMMENDED</span>
					that the Agent send one or more <code>SIF_CancelRequests</code> messages to the ZIS.  Such data collections can place
					a heavy load on responding Agents, where often all data of a specific object type is requested, 
					and cancelling requests may spare Zone resources.  Cancelling of responses can also reduce the number of response packets
					the receiving/cancelling agent needs to process and discard.</p>
    <p>If the cancelling Agent wishes to receive a "final" <code>SIF_Response</code> from the ZIS for each cancelled message, it can
					specify <code>Standard</code> in <code>SIF_CancelRequests/SIF_NotificationType</code>.  If the cancelling Agent does not desire
					or require "final" <code>SIF_Response</code>s, the Agent can specify <code>None</code> in <code>SIF_NotificationType</code>.</p>
    <a name="Table411151SIF_CancelRequestsProtocol" />
    <table title="SIF_CancelRequests Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Add a <a href="Infrastructure.html#SIF_CancelRequests"><code>SIF_CancelRequests</code></a>
							element in <code>SIF_SystemControlData</code>.</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>Specify <code>Standard</code> in <code>NotificationType</code> if your Agent desires or requires a "final" <code>SIF_Response</code>
							be returned by the ZIS for each cancelled message (<code>SIF_Response/SIF_MorePackets</code> = <code>No</code>).  Otherwise
							specify <code>None</code>.</td>
        <td> </td>
      </tr>
      <tr>
        <td>3</td>
        <td>Add a <code>SIF_RequestMsgIds</code> element and add a child <code>SIF_RequestMsgId</code> element for each <code>SIF_Request</code>
							that the Agent wishes to cancel.</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 8.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>The ZIS has accepted the <code>SIF_CancelRequests</code> message.  Your Agent will receive
							or not receive "final" <code>SIF_Response</code>s per the specified <code>NotificationType</code>.</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate SIF_MsgId).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.15-1: SIF_CancelRequests Protocol</span>
    <a name="AgentMessagingSIF_GetMessage" />
    <h4>4.1.1.16 SIF_GetMessage (Pull-Mode only)</h4>
    <p>Pull-mode Agents retrieve the next message in their queue by sending 
					a <a href="Infrastructure.html#SIF_GetMessage"><code>SIF_GetMessage</code></a> message to the ZIS.  Note that as individual messages
					may have specific minimum encryption/authentication levels attached to them by senders, a Pull-Mode Agent should always
					use the highest encryption/authentication levels it supports when contacting the ZIS to avoid individual messages
					being discarded when contacting the ZIS using lower encryption/authentication levels than might be required for receipt
					of a given message.</p>
    <a name="Table411161SIF_GetMessageProtocol" />
    <table title="SIF_GetMessage Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_GetMessage"><code>SIF_GetMessage</code></a>
							element in <code>SIF_SystemControlData</code>.</td>
        <td>Send <code>SIF_Message</code> to ZIS over appropriate transport.  Always use the highest encryption/authentication levels
							that your Agent supports to maximize the number of messages that can be returned to your Agent.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 7.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
          <code>SIF_Status/SIF_Data</code> contains the next <a href="Infrastructure.html#SIF_Message"><code>SIF_Message</code></a> in your agent's queue.</td>
        <td>Messaging protocol complete (success).  Process the returned <code>SIF_Message</code> 
							according to <a href="#AgentMessageHandlingProtocols">Agent Message Handling Protocols</a> below.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>9</code>?</td>
        <td>If yes, there are no messages available for your Agent.  Message processing complete (success).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.  If a Push-mode Agent sends <code>SIF_GetMessage</code>, note particularly category <code>5</code>,
							code <code>9</code> (agent registered in Push mode).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.16-1: SIF_GetMessage Protocol</span>
    <a name="AgentMessagingSIF_AckPushMode" />
    <h4>4.1.1.17 SIF_Ack (Push-Mode)</h4>
    <p>
						Push-Mode Agents end Selective Message Blocking (SMB) by sending a final <code>SIF_Ack</code> to the ZIS.
					</p>
    <a name="Table411171SIF_AckProtocolPushMode" />
    <table title="SIF_Ack Protocol (Push-Mode)">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Message/SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  From the message being unblocked/removed from the queue, place the <code>SIF_Header/SIF_SourceId</code>
								value into <code>SIF_OriginalSourceId</code> and place the <code>SIF_Header/SIF_MsgId</code> value into <code>SIF_OriginalMsgId</code>.
								Place <code>3</code> (final <code>SIF_Ack</code>) into <code>SIF_Code/SIF_Data</code>.
							</td>
        <td>
								Send <code>SIF_Message</code> to ZIS over appropriate transport.
							</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.
								Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?
							</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>0</code>?
							</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								The referenced message has been unblocked and removed from your
								Agent's queue.  The ZIS resumes delivery of events to your Agent.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
								<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>
								Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.17-1: SIF_Ack Protocol (Push-Mode)</span>
    <a name="AgentMessagingSIFAckPullMode" />
    <h4>4.1.1.18 SIF_Ack (Pull-Mode)</h4>
    <p>
						Pull-mode Agents acknowledge messages received in response to <code>SIF_GetMessage</code> and remove them from their queue by sending a <code>SIF_Ack</code>
						message to the ZIS.  <code>SIF_Ack</code> is also sent by Pull-Mode Agents to invoke and end Selective Message Blocking (SMB).
					</p>
    <a name="Table411181SIF_AckProtocolPullMode" />
    <table title="SIF_Ack Protocol (Pull-Mode)">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Message/SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.</td>
        <td>If your Agent is invoking SMB, go to Step 3.  If your Agent is ending SMB, go to Step 4.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								From the message being acknowledged/the message to be removed from the queue, place the <code>SIF_Header/SIF_SourceId</code>
								value into <code>SIF_OriginalSourceId</code> and place the <code>SIF_Header/SIF_MsgId</code> value into <code>SIF_OriginalMsgId</code>.
								Place <code>1</code> (immediate <code>SIF_Ack</code>) into <code>SIF_Code/SIF_Data</code> or an appropriate error description in
								<code>SIF_Error</code>.  If your Agent indicates a transport error or places <code>8</code> (receiver is sleeping) into
								<code>SIF_Code/SIF_Data</code>, the message
								will be acknowledged but remain in your Agent's queue.
							</td>
        <td>
							Send <code>SIF_Message</code> to ZIS over appropriate transport.  Go to Step 5.
						</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								From the <code>SIF_Event</code> being blocked, place the <code>SIF_Header/SIF_SourceId</code>
								value into <code>SIF_OriginalSourceId</code> and place the <code>SIF_Header/SIF_MsgId</code> value into <code>SIF_OriginalMsgId</code>.
								Place <code>2</code> (intermediate <code>SIF_Ack</code>) into <code>SIF_Code/SIF_Data</code>.
								</td>
        <td>
								Send <code>SIF_Message</code> to ZIS over appropriate transport.  Go to Step 5.
							</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								From the <code>SIF_Event</code> being unblocked, place the <code>SIF_Header/SIF_SourceId</code>
								value into <code>SIF_OriginalSourceId</code> and place the <code>SIF_Header/SIF_MsgId</code> value into <code>SIF_OriginalMsgId</code>.
								Place <code>3</code> (final <code>SIF_Ack</code>) into <code>SIF_Code/SIF_Data</code>.
							</td>
        <td>
								Send <code>SIF_Message</code> to ZIS over appropriate transport.
							</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.  
							Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?</td>
        <td>If yes, go to Step 9.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>0</code>?</td>
        <td>If no, go to Step 8.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>
          <p>If your Agent did not invoke or end SMB for a <code>SIF_Event</code>, the referenced message has been removed from your
							Agent's queue, unless your agent indicated a transport error or that it was sleeping (in which case the message
							has been acknowledged but remains in your Agent's queue).</p>
          <p>
									If your Agent invoked SMB by sending an intermediate <code>SIF_Ack</code>, delivery of events is blocked until your
									Agent removes the <code>SIF_Event</code> from its queue by sending a final <code>SIF_Ack</code>.  Your Agent will
									continue to receive <code>SIF_Response</code>s and <code>SIF_Request</code>s.
								</p>
          <p>
									If your Agent ended SMB by sending a final <code>SIF_Ack</code>, the ZIS has removed the blocked event from your Agent's queue
									and resumes delivery of events to your Agent.
								</p>
        </td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
							<code>8</code> (ZIS is asleep) or <code>7</code> (your Agent sent a duplicate <code>SIF_MsgId</code>).</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
							condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with 
							<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
							if included.</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.1.18-1: SIF_Ack Protocol (Pull-Mode)</span>
    <a name="AgentMessageHandlingProtocols" />
    <h3>4.1.2 Agent Message Handling Protocols</h3>
    <p>This section documents how Agents should respond to incoming messages, and the resulting post-conditions upon success or failure, along
				with any necessary steps to take.</p>
    <p>Note that in handling any <code>SIF_Message</code>, an Agent may return a <code>SIF_Ack</code> with
				<code>SIF_Status/SIF_Code</code> <code>8</code> (receiver is sleeping) or <code>7</code> (already
				have this <code>SIF_MsgId</code> from you) if a duplicate message is detected.  These responses are typically omitted from the handling protocols below.</p>
    <a name="AgentMessageHandlingSIF_Message" />
    <h4>4.1.2.1 SIF_Message</h4>
    <p>Upon receipt of a generic message from the ZIS, in most cases it may be safely assumed that the message XML
				is well-formed, and perhaps even valid, but the Agent should take the following steps to determine
				whether the XML is well-formed, optionally validate the message, and check that the message is of a valid type before handing the message
				off to the respective message handling protocol below.</p>
    <a name="Table41211SIF_MessageHandling" />
    <table title="SIF_Message Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>If your transport layer implementation rejects XML that is not well-formed and optionally that is invalid, go to Step 3, 5, 7 or 9
							depending on the extent of that implementation.  
							Otherwise, is the XML message well-formed?</td>
        <td>If yes, go to step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  If your Agent can scan the incoming message as UTF-8 encoded text to locate <code>SIF_Header/SIF_SourceId</code>
							and <code>SIF_Header/SIF_MsgId</code>, these values can be placed in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  Otherwise include these elements with empty values, including an <code>xsi:nil</code> attribute value of
							<code>true</code> on <code>SIF_OriginalMsgId</code>.  Include a <code>SIF_Error</code> element with a <code>SIF_Category</code>
							of <code>1</code> (XML Validation) and a <code>SIF_Code</code> of <code>2</code> (message is not well-formed).</td>
        <td>Go to step 12.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is the root element of the message unprefixed with a local name of <code>SIF_Message</code>?</td>
        <td>If yes, go to step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code> 
							in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  Include a <code>SIF_Error</code> element with a <code>SIF_Category</code>
							of <code>1</code> (XML Validation) and a <code>SIF_Code</code> of <code>3</code> (generic validation error).</td>
        <td>Go to step 12.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Is the namespace for <code>SIF_Message</code> a namespace of a major version of SIF your Agent supports?  Is 
							<code>SIF_Message/@Version</code> present with a value that your Agent supports?  (If omitted, interpret
							<code>SIF_Message/@Version</code> as <code>1.1</code>.)</td>
        <td>If yes, go to step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code> 
							in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  Include a <code>SIF_Error</code> element with a <code>SIF_Category</code>
							of <code>12</code> (Generic Message Handling) and a <code>SIF_Code</code> of <code>3</code> (version not supported).</td>
        <td>Go to step 12.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>If your Agent does not validate messages, go to step 9.  Otherwise choose a validation schema based
							on the value of <code>SIF_Message/@Version</code>.  Does the message validate?</td>
        <td>If yes, go to step 9.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code> 
							in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  Include a <code>SIF_Error</code> element with a <code>SIF_Category</code>
							of <code>1</code> (XML Validation) and an appropriate <code>SIF_Code</code> from the corresponding choices in
							<a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a>.</td>
        <td>Go to step 12.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>If the namespace for <code>SIF_Message</code> is for a previous major version of SIF, handle according to
							the specification for <code>SIF_Message/@Version</code>.  Otherwise, is the message type (the child element of <code>SIF_Message</code>)
							<code>SIF_Event</code>, <code>SIF_Request</code>,
							<code>SIF_Response</code>, <code>SIF_Ping</code> (Push-mode only), <code>SIF_Sleep</code> (Push-mode only), 
							<code>SIF_Wakeup</code> (Push-mode only), or <code>SIF_CancelRequests</code> (Push-mode only and your Agent chooses
							to support this optional message)?</td>
        <td>If yes, go to step 11.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code> 
							in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  Include a <code>SIF_Error</code> element with a <code>SIF_Category</code>
							of <code>12</code> (Generic Message Handling) and a <code>SIF_Code</code> of <code>2</code> (message not supported).</td>
        <td>Go to step 12.</td>
      </tr>
      <tr>
        <td>11</td>
        <td>Process per the corresponding message handling protocol below.</td>
        <td>Message handling is complete.</td>
      </tr>
      <tr>
        <td>12</td>
        <td>If your Agent is a Push-mode Agent, return the <code>SIF_Ack</code> to the ZIS.  If your Agent is a Pull-mode
							Agent send the <code>SIF_Ack</code> to the ZIS per <a href="#SIF_AckPullMode"><code>SIF_Ack</code> (Pull-Mode)</a> above.</td>
        <td>Message handling is complete.</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.2.1-1: SIF_Message Handling</span>
    <a name="AgentMessageHandlingSIF_Event" />
    <h4>4.1.2.2 SIF_Event</h4>
    <p>
						A ZIS places a <code>SIF_Event</code> in your Agent's queue when an event occurs in a Zone Context with regard to an
						object for which your agent
						has subscribed to receive events.  A <code>SIF_Event</code> is delivered when it is the next message pending delivery
						in the queue.
					</p>
    <p>An event may apply to one or more contexts; these are listed in <code>SIF_Header/SIF_Contexts</code>.
					If <code>SIF_Contexts</code> is not present, the context for the event is <code>SIF_Default</code>.
					The type of event is specified in <code>SIF_EventObject/@Action</code>, the corresponding data object is in <code>SIF_EventObject</code>.
					A <code>Change</code> or <code>Delete</code> event may contain a partial object, but it must include the necessary attribute(s) and element(s)
					to uniquely identify the object being changed or deleted.  These keys/identifiers are typically communicated in the root attributes of
					an object.
				</p>
    <a name="Table41221SIF_EventHandling" />
    <table title="SIF_Event Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Does your Agent invoke Selective Message Blocking (SMB) for all events, or does this event indicate to your Agent
								that it will invoke SMB?
							</td>
        <td>If no, go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
          <p>
									Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
										<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
										your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
										elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
										in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
										respectively.  Place <code>2</code> (intermediate <code>SIF_Ack</code>) in <code>SIF_Status/SIF_Code</code>.
								</p>
          <p>
									If your Agent is a Push-Mode Agent, return the <code>
										SIF_Ack</code> to the ZIS and commence sending the necessary requests
										as described in the <code>SIF_Request</code> protocol above to complete processing of the event per your Agent's business rules.
										When complete or if an error occurs, end SMB as described in the <code>SIF_Ack</code> (Push-Mode) protocol above.
									</p>
          <p>
									If your Agent is a Pull-Mode Agent, send the <code>
										SIF_Ack</code> to the ZIS per <code>SIF_Ack</code> (Pull-Mode) above and commence sending the necessary requests
										as described in the <code>SIF_Request</code> protocol above to complete processing of the event per your Agent's business rules.
										When complete or if an error occurs, end SMB as described in the <code>SIF_Ack</code> (Pull-Mode) protocol above.
									</p>
          <p>If an error occurs, it is <span class="rfc2119">RECOMMENDED</span>
							 that your Agent publish a <code>SIF_LogEntry</code> <code>Add</code> event.
							</p>
        </td>
        <td>Message handling complete.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
          <p>If your Agent is a Pull-Mode Agent, process the event per your Agent's business rules.  When complete or if an error occurs,
								acknowledge the message and remove it from your Agent's queue per <code>SIF_Ack</code> (Pull-Mode) above.</p>
          <p>
									If your Agent is a Push-Mode Agent, it has one of two options:  process the event, then acknowledge it; or acknowledge
									the event, then process it.  The advantage of first processing the event is the ability to return a descriptive error,
									if necessary, to the ZIS when acknowledging the message.  The disadvantage of first processing is that if the processing is long running, 
									the connection
									from the ZIS to your Agent may time out, which will lead to the event being redelivered to your Agent in another delivery attempt,
									to possibly run into another time-out.  To avoid the latter, it is <span class="rfc2119">RECOMMENDED</span> that your Push-Mode
									Agent first acknowledge the event, then process it, unless event processing is known to always occur within a reasonable amount of time.
									Agents that first acknowledge then process <span class="rfc2119">SHOULD</span> persist the event locally until processing is complete,
									as the event is removed from your Agent's queue upon successful acknowledgement, otherwise the event will be lost in the case of
									an application or system error that affects your Agent's ability to complete processing of the event.
								</p>
          <p>
									Choose an option and process the event according to your Agent's business rules.  When acknowledging:
									Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
									<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
									your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
									elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
									in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
									respectively.  Place <code>1</code> (immediate <code>SIF_Ack</code>) in <code>SIF_Status/SIF_Data</code> in the case of successful procssing,
									and return the <code>SIF_Ack</code> to the ZIS.  If an error has occurred, include a <code>SIF_Error</code> element with an
									appropriate <code>SIF_Category</code> and <code>SIF_Code</code> and describe the error as needed in <code>SIF_Desc</code>
									and optionally <code>SIF_ExtendedDesc</code>.  Note that indicating a transport error will not remove the message from your
									Agent's queue, only acknowledge it.  The same action can be accomplished indicating <code>8</code> (receiver is sleeping) in
									<code>SIF_Status/SIF_Code</code>.
								</p>
          <p>
									If an error occurs regardless of the option chosen, it is <span class="rfc2119">RECOMMENDED</span>
									that your Agent publish a <code>SIF_LogEntry</code> <code>Add</code> event.
								</p>
        </td>
        <td>Message handling complete</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.2.2-1: SIF_Event Handling</span>
    <a name="AgentMessageHandlingSIF_Request" />
    <h4>4.1.2.3 SIF_Request</h4>
    <p>
						A ZIS places a <code>SIF_Request</code> in your Agent's queue when an Agent sends a request directly to your Agent,
						or when an Agent sends a request without a <code>SIF_DestinationId</code> and your agent is registered as the Provider
						for the object requested in <code>SIF_Query</code>, or in the case of <code>SIF_ExtendedQuery</code> when your agent is registered
						as the Provider of the object specified by the Requester in <code>SIF_ExtendedQuery/SIF_DestinationProvider</code> or
						<code>SIF_ExtendedQuery/SIF_From/@ObjectName</code>.  The ZIS will not send your Agent a <code>SIF_ExtendedQuery</code>
						unless your Agent has registered its support for that query type using <code>SIF_Provide</code> or <code>SIF_Provision</code>.
						A <code>SIF_Request</code> is delivered when it is the next message pending delivery
						in your Agent's queue.
					</p>
    <p>
						Any error that occurs while generating <code>SIF_Response</code>s
						during <code>SIF_Request</code> handling <span class="rfc2119">MUST</span> be sent to the Requester
						with <code>SIF_MorePackets</code> set to <code>No</code>, at which point the response stream ends.
					</p>
    <a name="Table41231SIF_RequestHandling" />
    <table title="SIF_Request Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Examine <code>SIF_Header/SIF_Contexts</code> to determine the context for the request; if none is specified, the context
							is <code>SIF_Default</code>.</td>
        <td>Go to Step 3 if the context is supported.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
          <p>Prepare a <code>SIF_Response</code> message with a copy of <code>SIF_Contexts</code>, <code>SIF_DestinationId</code> set to <code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to 
								<code>SIF_MsgId</code> from the <code>SIF_Request</code> message.</p>
          <p>Add a <code>SIF_Error</code> element with the <code>SIF_Error/SIF_Category</code> set to indicate General Message Handling and <code>SIF_Error/SIF_Code</code> and 
								<code>SIF_Error/SIF_Desc</code> to indicate that the requested context is not supported.</p>
          <p>Add <code>SIF_PacketNumber</code> with a value of <code>1</code> and set <code>SIF_MorePackets</code> to <code>No</code>.</p>
          <p>Send the <code>SIF_Response</code> to the original requester and acknowledge the error to the ZIS.</p>
        </td>
        <td>Message handling complete.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Examine the <code>SIF_Version</code> element or elements specified in the <code>SIF_Request</code> message.  If more than one version is supported, select
							the highest version number supported.</td>
        <td>Go to Step 5 if a version is supported.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
          <p>Prepare a <code>SIF_Response</code> message with a copy of <code>SIF_Contexts</code>, <code>SIF_DestinationId</code> set to <code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to 
								<code>SIF_MsgId</code> from the <code>SIF_Request</code> message.</p>
          <p>Add a <code>SIF_Error</code> element with the <code>SIF_Error/SIF_Category</code> set to indicate Request and Response and <code>SIF_Error/SIF_Code</code> and 
								<code>SIF_Error/SIF_Desc</code> to indicate that the requested <code>SIF_Version</code>s are not supported.</p>
          <p>Add <code>SIF_PacketNumber</code> with a value of <code>1</code> and set <code>SIF_MorePackets</code> to <code>No</code>.</p>
          <p>Send the <code>SIF_Response</code> to the original requester and acknowledge the error to the ZIS.</p>
        </td>
        <td>Message handling complete.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Examine the <code>SIF_MaxBufferSize</code> specified in the <code>SIF_Request</code> message.</td>
        <td>Go to Step 7 if it is greater than or equal to the minimum buffer size your Agent can support.
							(The buffer size of individual packets will be handled below).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>
          <p>Using the SIF version selected in Step 1, prepare a <code>SIF_Response</code> message with <code>SIF_DestinationId</code> set to <code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to <code>SIF_MsgId</code> from the <code>SIF_Request</code> message.</p>
          <p>Add a <code>SIF_Error</code> element with the <code>SIF_Error/SIF_Category</code> set to indicate Request and Response and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that the <code>SIF_MaxBufferSize</code> cannot be honored.</p>
          <p>Add <code>SIF_PacketNumber</code> with a value of <code>1</code> and set <code>SIF_MorePackets</code> to <code>No</code>.</p>
          <p>Send the <code>SIF_Response</code> to the original requester and acknowledge the error to the ZIS.</p>
        </td>
        <td>Message handling complete.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Is <code>SIF_ExtendedQuery</code> specified?</td>
        <td>If yes, go to Step 10.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>The query type is <code>SIF_Query</code>.  Examine the object name being queried in <code>SIF_QueryObject/@ObjectName</code>.</td>
        <td>Go to Step 8 if the object is supported.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>
          <p>Prepare a <code>SIF_Response</code> message using the version chosen in Step 1 with <code>SIF_DestinationId</code> set to <code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to <code>SIF_MsgId</code> from the <code>SIF_Request</code> message.</p>
          <p>Add a <code>SIF_Error</code> element with the <code>SIF_Error/SIF_Category</code> set to indicate Request and Response and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that the object is not supported.</p>
          <p>Add <code>SIF_PacketNumber</code> with a value of <code>1</code> and set <code>SIF_MorePackets</code> to <code>No</code>.</p>
          <p>Send the <code>SIF_Response</code> to the original requester and acknowledge the error to the ZIS.</p>
        </td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Examine the query represented, if any, by <code>SIF_ConditionGroup</code>, or <code>SIF_Example</code> in the case of objects that support query-by-example, and determine whether it is supported.</td>
        <td>Go to Step 12 if neither <code>SIF_ConditionGroup</code> nor <code>SIF_Example</code> is present, 
							or if the query represented by <code>SIF_ConditionGroup</code> or <code>SIF_Example</code> is supported.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>
          <p>Prepare a <code>SIF_Response</code> message with <code>SIF_DestinationId</code> set to <code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to <code>SIF_MsgId</code> from the <code>SIF_Request</code> message.</p>
          <p>Add a <code>SIF_Error</code> element with the <code>SIF_Error/SIF_Category</code> set to indicate Request and Response and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that the query is not supported.</p>
          <p>Add <code>SIF_PacketNumber</code> with a value of <code>1</code> and set <code>SIF_MorePackets</code> to <code>No</code>.</p>
          <p>Send the <code>SIF_Response</code> to the original requester and acknowledge the error to the ZIS.</p>
        </td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Examine the query represented by <code>SIF_ExtendedQuery</code>, and determine whether it is supported.
							</td>
        <td>Go to Step 12 if the query is supported.</td>
      </tr>
      <tr>
        <td>11</td>
        <td>
          <p>Prepare a <code>SIF_Response</code> message with <code>SIF_DestinationId</code> set to <code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to <code>SIF_MsgId</code> from the <code>SIF_Request</code> message.</p>
          <p>Add a <code>SIF_Error</code> element with the <code>SIF_Error/SIF_Category</code> set to indicate Request and Response and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that the query is not supported.</p>
          <p>Add <code>SIF_PacketNumber</code> with a value of <code>1</code> and set <code>SIF_MorePackets</code> to <code>No</code>.</p>
          <p>Send the <code>SIF_Response</code> to the original requester and acknowledge the error to the ZIS.</p>
        </td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>12</td>
        <td>
          <p>Note that Push-Mode Agents should acknowledge receipt of the <code>SIF_Request</code>
					as response generation is typically a long-running operation that will typically lead to HTTP time-outs.  As the request will be removed
					from the Agent's queue, it is <span class="rfc2119">RECOMMENDED</span> that the Push-Mode Agent persist the request and its <code>SIF_PacketNumber</code>
					while generating responses,
					in case of an application or system failure that prevents it from completing the request processing; upon restarting, the Agent can
					end the response stream with a <code>SIF_Error</code>, <code>SIF_PacketNumber</code> set to the last successfully transmitted <code>SIF_PacketNumber + 1</code>
					and <code>SIF_MorePackets</code> set to <code>No</code>.</p>
          <p>If a Push-Mode Agent elects to successfully acknowledge the request before processing, it can do so.  Otherwise it should acknowledge receipt of the
					request upon completion of response generation.</p>
          <p>Pull-Mode Agents can choose to acknowledge receipt of the request here or at the end of response generation.</p>
          <p>Initialize packet counter to 1.</p>
        </td>
        <td />
      </tr>
      <tr>
        <td>13</td>
        <td>Prepare a <code>SIF_Response</code> message with <code>SIF_DestinationId</code> set to <code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to <code>SIF_MsgId</code> from the <code>SIF_Request</code> message.
							When handling <code>SIF_ExtendedQuery</code>, copy the requested columns into <code>SIF_ExtendedQueryResults/SIF_ColumnHeaders</code>.</td>
        <td />
      </tr>
      <tr>
        <td>14</td>
        <td>Add one or more of the matching objects into <code>SIF_ObjectData</code>, for <code>SIF_Query</code>, or rows into <code>SIF_ExtendedQueryResult</code>, for <code>SIF_ExtendedQuery</code>,
						 until no more will fit within the specified buffer size. 
							If no objects or rows will fit within <code>SIF_MaxBufferSize</code>, go to Step 15 with the <code>SIF_Error/SIF_Category</code> set to indicate 
							Request and Response and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that <code>SIF_MaxBufferSize</code> cannot be honored.
							Otherwise, note that only requested columns are returned when processing <code>SIF_ExtendedQuery</code>.  When processing <code>SIF_Query</code>, if the requester specified only
							certain elements be returned, that the Responder needs to return only those elements and their parent elements and attributes.  Not supporting
							a requested element/attribute does not exclude the object from the response stream; include the parent elements/attributes of any missing elements,
							including the object itself. 
							</td>
        <td>If no errors occur in retrieving/adding matching objects, go to step 16.</td>
      </tr>
      <tr>
        <td>15</td>
        <td>Set <code>SIF_PacketNumber</code> to the current packet counter and <code>SIF_MorePackets</code> to <code>No</code>. 
							Add an appropriate <code>SIF_Error</code> element to the <code>SIF_Response</code> and send the <code>SIF_Response</code> to the ZIS.</td>
        <td>Go to Step 19.</td>
      </tr>
      <tr>
        <td>16</td>
        <td>Set <code>SIF_PacketNumber</code> to the current packet counter value and set <code>SIF_MorePackets</code> appropriately. Send the <code>SIF_Response</code> to the ZIS.</td>
        <td />
      </tr>
      <tr>
        <td>17</td>
        <td>Examine the <code>SIF_Ack</code> returned by the ZIS.</td>
        <td>If an error occurred, stop processing the <code>SIF_Request</code> message.  Go to Step 19.</td>
      </tr>
      <tr>
        <td>18</td>
        <td>Determine if more objects or rows match the specified conditions.</td>
        <td>If yes, increment the packet counter and go to Step 13; otherwise, go to Step 19.</td>
      </tr>
      <tr>
        <td>19</td>
        <td>If your Agent has not yet acknowledged receipt of the incoming request, 
							acknowledge successful receipt of the request, or return a descriptive error to the ZIS.</td>
        <td>Message handling complete.</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.2.3-1: SIF_Request Handling</span>
    <a name="AgentMessageHandlingSIF_Response" />
    <h4>4.1.2.4 SIF_Response</h4>
    <p>
						A ZIS places a <code>SIF_Response</code> in your Agent's queue when a responder sends a response packet to your Agent
						per a <code>SIF_Request</code> previously sent by your Agent.  It is delivered when it is the next message available for
						delivery to your Agent.
					</p>
    <a name="Table41241SIF_EventHandling" />
    <table title="SIF_Event Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
          <code>SIF_RequestMsgId</code> indicates which of your <code>SIF_Request</code>s this packet is in response to.  Is
								<code>SIF_Error</code> present?
							</td>
        <td>If no, go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
          <p>
								The Responder's handling of your Agent's <code>SIF_Request</code> has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.  this is the last packet your Agent will receive associated
								with that request.
								</p>
          <p>If your Agent is a Pull-Mode Agent, acknowledge the message per <code>SIF_Ack</code> (Pull-Mode) above.</p>
          <p>
									If your Agent is a Push-Mode Agent: Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
									<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
									your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
									elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
									in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
									respectively.  Place <code>1</code> (immediate <code>SIF_Ack</code>) in <code>SIF_Status/SIF_Data</code>, and return the <code>SIF_Ack</code> to the ZIS.
							</p>
        </td>
        <td>Message handling complete.  Any resources associated with the request can be released.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
          <p>
									If your Agent is a Pull-Mode Agent, process the response per your Agent's business rules.  When complete or if an error occurs,
									acknowledge the message and remove it from your Agent's queue per <code>SIF_Ack</code> (Pull-Mode) above.
								</p>
          <p>
									If your Agent is a Push-Mode Agent, it has one of two options:  process the response, then acknowledge it; or acknowledge
									the response, then process it.  The advantage of first processing the response is the ability to return a descriptive error,
									if necessary, to the ZIS when acknowledging the message.  The disadvantage of first processing is that if the processing is long running,
									the connection
									from the ZIS to your Agent may time out, which will lead to the response being redelivered to your Agent in another delivery attempt,
									to possibly run into another time-out.  To avoid the latter, it is <span class="rfc2119">RECOMMENDED</span> that your Push-Mode
									Agent first acknowledge the response, then process it, unless response processing is known to always occur within a reasonable amount of time.
									Agents that first acknowledge then process <span class="rfc2119">SHOULD</span> persist the response locally until processing is complete,
									as the response is removed from your Agent's queue upon successful acknowledgement, otherwise the response will be lost in the case of
									an application or system error that affects your Agent's ability to complete processing of the response.
								</p>
          <p>
									Choose an option and process the response according to your Agent's business rules.  When acknowledging:
									Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
									<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
									your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
									elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
									in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
									respectively.  Place <code>1</code> (immediate <code>SIF_Ack</code>) in <code>SIF_Status/SIF_Data</code> in the case of successful procssing, 
									and return the <code>SIF_Ack</code> to the ZIS.  If an error has occurred, include a <code>SIF_Error</code> element with an
									appropriate <code>SIF_Category</code> and <code>SIF_Code</code> and describe the error as needed in <code>SIF_Desc</code>
									and optionally <code>SIF_ExtendedDesc</code>.  Note that indicating a transport error will not remove the message from your
									Agent's queue, only acknowledge it.  The same action can be accomplished indicating <code>8</code> (receiver is sleeping) in
									<code>SIF_Status/SIF_Code</code>.</p>
          <p>
									If an error occurs regardless of the option chosen, it is <span class="rfc2119">RECOMMENDED</span>
									that your Agent publish a <code>SIF_LogEntry</code> <code>Add</code> event.
								</p>
        </td>
        <td>Message handling complete.  If <code>SIF_MorePackets</code> is <code>No</code>, this is the last packet associated with the request 
							your Agent will receive; any resources associated with the request can be released.
						</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.2.4-1: SIF_Event Handling</span>
    <a name="AgentMessageHandlingSIF_Ping" />
    <h4>4.1.2.5 SIF_Ping (Push-Mode only)</h4>
    <p>
					The ZIS is pinging your Agent to see if it is reachable, "awake" and/or processing messages.
				</p>
    <a name="Table41251SIF_PingHandling" />
    <table title="SIF_Ping Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
							Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
							in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  If your Agent is "awake," include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
							of <code>1</code> (immediate <code>SIF_Ack</code>).  Otherwise you may optionally notify the ZIS that
							your Agent is asleep by returning a <code>SIF_Code</code> of <code>8</code> (receiver is sleeping).
						</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
							Return the <code>SIF_Ack</code> to the ZIS.
						</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.2.5-1: SIF_Ping Handling</span>
    <a name="AgentMessageHandlingSIF_Sleep" />
    <h4>4.1.2.6 SIF_Sleep (Push-Mode only)</h4>
    <p>
					The ZIS has changed its state to "asleep" and is either not processing incoming messages or all incoming messages
					will be acknowledged with a <code>SIF_Ack/SIF_Status/SIF_Code</code> value of <code>8</code> (receiver is sleeping); delivery of 
					queued messages to your Agent is halted.  Your
					Agent <span class="rfc2119">SHOULD</span> avoid sending messages to the ZIS until receipt of a <code>SIF_Wakeup</code> message,
					or be prepared to handle transport errors or the aforementioned acknowledgement.
				</p>
    <a name="Table41261SIF_SleepHandling" />
    <table title="SIF_Sleep Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
							Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
							in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  Include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
							of <code>1</code> (immediate <code>SIF_Ack</code>).  Change your Agent's ZIS state to "asleep."
						</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
							Return the <code>SIF_Ack</code> to the ZIS.
						</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.2.6-1: SIF_Sleep Handling</span>
    <a name="AgentMessageHandlingSIF_Wakeup" />
    <h4>4.1.2.7 SIF_Wakeup (Push-Mode only)</h4>
    <p>The ZIS has changed its state to "awake" and is processing incoming messages and delivering queued messages again.</p>
    <a name="Table41271SIF_WakeupHandling" />
    <table title="SIF_Wakeup Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
							Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
							in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  Include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
							of <code>1</code> (immediate <code>SIF_Ack</code>).  Change your Agent's ZIS state to "awake."
						</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
							Return the <code>SIF_Ack</code> to the ZIS.
						</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.2.7-1: SIF_Wakeup Handling</span>
    <a name="AgentMessageHandlingSIF_CancelRequests" />
    <h4>4.1.2.8 SIF_CancelRequests (Push-Mode only) (optional)</h4>
    <p>
					A ZIS is requesting that your Agent cancel processing of one or more <code>SIF_Request</code> messages.  Support
					for handling of this message is currently optional for Push-Mode Agents.  If your Agent does not support
					<code>SIF_CancelRequests</code>, it returns a Generic Message Handling error upon receipt of the <code>SIF_SystemControl</code>
					message, error code "Message not supported," per the 
					<a href="#AgentMessageHandlingSIF_Message"><code>SIF_Message</code> handling protocol</a>.
				</p>
    <a name="Table41281SIF_CancelRequestsHandling" />
    <table title="SIF_CancelRequests Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
							Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
							<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
							your Agent's Agent ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
							elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
							in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
							respectively.  Include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
							of <code>1</code> (immediate SIF_Ack).
						</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
							If your Agent is currently preparing <code>SIF_Response</code> packets for any of the <code>SIF_Request</code> messages
							specified in the <code>SIF_RequestMsgId</code> element(s), stop processing the request(s).  If your Agent
							has any of the specified <code>SIF_Request</code>s queued locally, remove them from the agent local queue.
						</td>
        <td> </td>
      </tr>
      <tr>
        <td>3</td>
        <td>
							Return the <code>SIF_Ack</code> to the ZIS.
						</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.1.2.8-1: SIF_CancelRequests Handling</span>
    <a name="ZISProtocols" />
    <h2>4.2 ZIS Protocols</h2>
    <a name="ZISMessagingProtocols" />
    <h3>4.2.1 ZIS Messaging Protocols</h3>
    <p>This section documents how Zone Integration Servers send individual messages, 
and the resulting post-conditions upon success or failure, along with
				any necessary steps to take.  These correspond to each of the actions a Zone Integration Server can initiate.</p>
    <a name="SIF_MessageDeliverySIF_EventSIF_RequestSIF_ResponseToAPushModeAgent" />
    <h4>4.2.1.1 SIF_Message Delivery (SIF_Event, SIF_Request, SIF_Response to a Push-mode Agent)</h4>
    <p>A ZIS contacts a Push-Mode Agent to deliver <code>SIF_Event</code>, <code>SIF_Request</code>
					and <code>SIF_Response</code> messages queued for the Agent.  This delivery protocol starts
					with a check on whether there are messages pending, as the protocol can loop as messages are delivered.
					</p>
    <a name="Table42111SIF_MessageDeliveryProtocol" />
    <table title="SIF_Message Delivery Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Are there messages queued for the Agent?
							</td>
        <td>
								  If yes, go to Step 2.  Otherwise messaging protocol complete (success).
							</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Is the state of the Agent "asleep?"  If yes, the ZIS <span class="rfc2119">SHOULD</span>
									wait until the Agent sends a <code>SIF_Wakeup</code> message or re-registers in Push mode before attempting
									message delivery.  Otherwise the ZIS <span class="rfc2119">MUST</span>
					be prepared to handle transport errors/exceptions and/or the Agent responding with a <code>SIF_Status/SIF_Code</code>
					of <code>8</code> (receiver is sleeping).
							</td>
        <td>
								  If no, go to Step 3.  Otherwise messaging protocol complete (success).  
							</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Has the Agent previously invoked SMB?
							</td>
        <td>
								  If no, go to Step 6.
							</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								Iterate through the Agent's queue from the message received first to the most
								recently received message.  Stop at the first <code>SIF_Response</code> or
								<code>SIF_Request</code> in the queue, if one exists.
							</td>
        <td>
								  If one exists, it is the next message to be delivered.  Go to Step 7.
							</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								The only messages queued for the Agent are <code>SIF_Events</code>; try again later, or after a <code>SIF_Response</code> or
								<code>SIF_Request</code> arrives, or after the Agent has ended SMB by sending a final <code>SIF_Ack</code>.
							</td>
        <td>
								  Messaging protocol complete (no message needs to be delivered).
							</td>
      </tr>
      <tr>
        <td>6</td>
        <td>
								The next message to be delivered is the message received first in the Agent's queue.
							</td>
        <td />
      </tr>
      <tr>
        <td>7</td>
        <td>
								Is <code>SIF_Header/SIF_Security</code> present in the <code>SIF_Message</code>
								with <code>SIF_EncryptionLevel</code>,
								<code>SIF_AuthenticationLevel</code>, or both?
							</td>
        <td>
								  If no, the message delivery encryption/authentication levels are the minimum encryption/authentication
									levels set up for the Zone.  Go to Step 9.
							</td>
      </tr>
      <tr>
        <td>8</td>
        <td>
								The ZIS <span class="rfc2119">MUST</span> guarantee that the minimum encryption and/or authentication
								levels specified are respected when delivering this message.  Use the higher
								of these and the Zone's minimum encryption and/or authentication levels during message delivery.
							</td>
        <td />
      </tr>
      <tr>
        <td>9</td>
        <td>
								If a connection is already open to the Push-Mode Agent from a previously delivered message, are the
								encryption and authentication levels greater than or equal to those needed for the delivery of this message?
							</td>
        <td>
								  If there is no connection open, go to Step 11.  If there is and the encryption/authentication
									levels are adequate for delivery, go to Step 13.
							</td>
      </tr>
      <tr>
        <td>10</td>
        <td>
								Attempt to renegotiate the encryption/authentication levels for the connection, 
								or close the connection and attempt to open a new connection with adequate encryption/authentication levels.
							</td>
        <td>
								  Go to Step 12.
							</td>
      </tr>
      <tr>
        <td>11</td>
        <td>
								If the registered transport layer is known to not provide adequate encryption/authentication levels
								(e.g. SIF HTTP), go to Step 12.  Otherwise attempt to open a connection to the Agent with adequate encryption/authentication levels, using
								the appropriate transport layer.
							</td>
        <td />
      </tr>
      <tr>
        <td>12</td>
        <td>
								Was a connection opened or renegotiated with adequate encryption/authentication levels?
								If no, the message cannot be delivered; remove it from the Agent's queue.  It is <span class="rfc2119">RECOMMENDED</span>
								that your ZIS log the error.  Your ZIS <span class="rfc2119">MUST</span> post a <code>SIF_LogEntry</code>
								 <code>Add</code> event with the appropriate error category and code, containing a copy of the <code>SIF_Header</code>
								of the queued message.  <code>SIF_LogEntry/SIF_Desc</code> <span class="rfc2119">MUST</span> contain
								the <code>SIF_SourceId</code> of the Agent that failed to receive the message. 
							</td>
        <td>
								  Go to Step 1 to start delivery of the next queued message, if desired.  Otherwise messaging protocol complete (error).
							</td>
      </tr>
      <tr>
        <td>13</td>
        <td>
								Send the message to the Agent over the connection.
							</td>
        <td />
      </tr>
      <tr>
        <td>14</td>
        <td>
								Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.
								Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?
							</td>
        <td>If yes, go to Step 24.</td>
      </tr>
      <tr>
        <td>15</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>1</code> (immediate <code>SIF_Ack</code>)?
							</td>
        <td>If no, go to Step 17.</td>
      </tr>
      <tr>
        <td>16</td>
        <td>
								The Agent has successfully acknowledged receipt of the message; remove it from the Agent's queue.
							</td>
        <td>Go to Step 1 to start delivery of the next queued message, if desired.  Otherwise messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>17</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>2</code> (intermediate <code>SIF_Ack</code>)?
							</td>
        <td>If no, go to Step 21.</td>
      </tr>
      <tr>
        <td>18</td>
        <td>
								The Agent is invoking SMB.  Is the delivered message a <code>SIF_Event</code>?
							</td>
        <td>If yes, go to Step 20.</td>
      </tr>
      <tr>
        <td>19</td>
        <td>
								The Agent has violated protocol; remove the message from the Agent's queue.  It is <span class="rfc2119">RECOMMENDED</span>
								that your ZIS log the error.  Your ZIS <span class="rfc2119">MUST</span> post a <code>SIF_LogEntry</code>
								 <code>Add</code> event with the appropriate error category of <code>13</code> (SMB Error)
								and code <code>2</code> (SMB can only be invoked for <code>SIF_Event</code>), containing a copy of the <code>SIF_Header</code>
								of the queued message.  <code>SIF_LogEntry/SIF_Desc</code> <span class="rfc2119">MUST</span> contain
								the <code>SIF_SourceId</code> of the Agent that committed the protocol error.
							</td>
        <td>Go to Step 1 to start delivery of the next queued message, if desired.  Otherwise messaging protocol complete (error).</td>
      </tr>
      <tr>
        <td>20</td>
        <td>
								The Agent has invoked SMB on this <code>SIF_Event</code>.  Persist that the Agent has invoked SMB along with
								the <code>SIF_MsgId</code> of the event.  The event stays in the agent's queue as blocked, and all other events
								are frozen until the Agent eventually ends SMB by sending a final <code>SIF_Ack</code>
								with this <code>SIF_MsgId</code> in <code>SIF_OriginalMsgId</code>, or by sending a <code>SIF_Wakeup</code> or
								by re-registering.
							</td>
        <td>Go to Step 1 to start delivery of the next queued message, if desired.  Otherwise messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>21</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>8</code> (receiver is sleeping)?
							</td>
        <td>If no, go to Step 23.</td>
      </tr>
      <tr>
        <td>22</td>
        <td>
								The Agent is asleep.  Re-attempt delivery later.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>23</td>
        <td>
								Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
								<code>7</code> (already have this <code>SIF_MsgId</code>).  The ZIS cannot correct this, as the <code>SIF_MsgId</code>
								originates from an Agent and can't be changed without other repercussions.  Remove the message from
								the Agent's queue.  It is <span class="rfc2119">RECOMMENDED</span>
								that your ZIS log the error.  Your ZIS <span class="rfc2119">MUST</span> post a <code>SIF_LogEntry</code>
								 <code>Add</code> event with the appropriate error category and code, containing a copy of the <code>SIF_Header</code>
								of the queued message.  <code>SIF_LogEntry/SIF_Desc</code> <span class="rfc2119">MUST</span> contain
								the <code>SIF_SourceId</code> of the Agent that did not receive the message.
							</td>
        <td>Go to Step 1 to start delivery of the next queued message, if desired.  Otherwise messaging protocol complete (error).</td>
      </tr>
      <tr>
        <td>24</td>
        <td>
								Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.  If <code>SIF_Category</code> does not indicate a transport error, remove the message from the Agent's
								queue.  Otherwise re-attempt delivery of this message later.  It is <span class="rfc2119">RECOMMENDED</span>
								that your ZIS log the error.  Your ZIS <span class="rfc2119">MAY</span> post a <code>SIF_LogEntry</code>
								 <code>Add</code> event with the appropriate error category and code, containing a copy of the <code>SIF_Header</code>
								of the queued message.  <code>SIF_LogEntry/SIF_Desc</code> <span class="rfc2119">MUST</span> contain
								the <code>SIF_SourceId</code> of the Agent that indicated the error.
							</td>
        <td>Go to Step 1 to start delivery of the next queued message, if desired.  Otherwise messaging protocol complete (error).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.1.1-1: SIF_Message Delivery Protocol</span>
    <a name="ZISMessagingSIF_Ping" />
    <h4>4.2.1.2 SIF_Ping (to a Push-mode Agent)</h4>
    <p>
						A ZIS can "ping" a Push-Mode Agent or check that it's "awake" by sending
						a <a href="Infrastructure.html#SIF_Ping"><code>SIF_Ping</code></a> message to the Agent.  If the Agent returns
						a successful acknowledgement, it is awake; the Agent may also reply that it is asleep.  As
						a Push-Mode Agent may be offline completely, Zone Integration Servers should be prepared to handle transport errors directly
						or wrapped in a <code>SIF_Ack/SIF_Error</code> by underlying code.
					</p>
    <a name="Table42121SIF_PingProtocol" />
    <table title="SIF_Ping Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_SystemControl</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								the Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_Ping"><code>SIF_Ping</code></a>
								element in <code>SIF_SystemControlData</code>.
							</td>
        <td>
								Send <code>SIF_Message</code> to Agent over appropriate transport.

							</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.
								Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?
							</td>
        <td>If yes, go to Step 8.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>1</code>?
							</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								The Agent is awake.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>8</code> (receiver is sleeping)?
							</td>
        <td>If no, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>
								The Agent is asleep.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>7</td>
        <td>
								Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
								<code>7</code> (your ZIS sent a duplicate <code>SIF_MsgId</code>).
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>8</td>
        <td>
								Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.1.2-1: SIF_Ping Protocol</span>
    <a name="ZISMessagingSIF_Sleep" />
    <h4>4.2.1.3 SIF_Sleep (to a Push-mode Agent)</h4>
    <p>
						A ZIS can send
						a <a href="Infrastructure.html#SIF_Sleep"><code>SIF_Sleep</code></a> message to a Push-Mode Agent to change its state
						to "sleeping," indicating that it will either be offline or acknowleding incoming messages with a <code>SIF_Status/SIF_Code</code>
						of <code>8</code> (receiver is sleeping), and that it will not be delivering messages to the Agent
						until it "wakes up"
						by sending a <code>SIF_Wakeup</code> message.
					</p>
    <a name="Table42131SIF_SleepProtocol" />
    <table title="SIF_Sleep Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_Sleep"><code>SIF_Sleep</code></a>
								element in <code>SIF_SystemControlData</code>.
							</td>
        <td>
								Send <code>SIF_Message</code> to Agent over appropriate transport.
							</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.
								Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?
							</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>1</code>?
							</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								The Agent has successfully acknowledged your <code>SIF_Sleep</code> and should not be expecting
								further message delivery until your ZIS sends a <code>SIF_Wakeup</code>.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
								<code>8</code> (Agent is asleep) or <code>7</code> (your ZIS sent a duplicate <code>SIF_MsgId</code>).
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>
								Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.1.3-1: SIF_Sleep Protocol</span>
    <a name="ZISMessagingSIF_Wakeup" />
    <h4>4.2.1.4 SIF_Wakeup (to a Push-mode Agent)</h4>
    <p>
						A ZIS can send
						a <a href="Infrastructure.html#SIF_Wakeup">SIF_Wakeup</a> message to a Push-Mode Agent to change its state to "awake;" i.e., that
						it is ready to process incoming messages and deliver queued messages again.
					</p>
    <a name="Table42141SIF_WakeupProtocol" />
    <table title="SIF_Wakeup Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place an empty <a href="Infrastructure.html#SIF_Wakeup"><code>SIF_Wakeup</code></a>
								element in <code>SIF_SystemControlData</code>.
							</td>
        <td>
								Send <code>SIF_Message</code> to Agent over appropriate transport.
							</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.
								Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?
							</td>
        <td>If yes, go to Step 6.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>1</code>?
							</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								The Agent has successfully acknowledged your "awake" status.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
								<code>8</code> (Agent is asleep) or <code>7</code> (your ZIS sent a duplicate <code>SIF_MsgId</code>).
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>
								Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.1.4-1: SIF_Wakeup Protocol</span>
    <a name="ZISMessagingSIF_CancelRequests" />
    <h4>4.2.1.5 SIF_CancelRequests (to a Push-mode Agent)</h4>
    <p>
						A ZIS can send
						a <a href="Infrastructure.html#SIF_CancelRequests">SIF_CancelRequests</a> message to a Push-Mode Agent 
						after receiving a <code>SIF_CancelRequests</code> messages from another agent, as per the
						<a href="#ZISMessageHandlingSIF_CancelRequests"><code>SIF_CancelRequests</code> message handling protocol</a>.
						As support for this message is currently optional for Push-Mode Agents, the ZIS should be prepared
						to handle a Generic Message Handling error from the Agent upon receipt of the <code>SIF_SystemControl</code>
message, error code "Message not supported."
					</p>
    <a name="Table42151SIF_CancelRequestsProtocol" />
    <table title="SIF_CancelRequests Protocol">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_SystemControl"><code>SIF_Message/SIF_SystemControl</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place a <a href="Infrastructure.html#SIF_CancelRequests"><code>SIF_CancelRequests</code></a>
								element in <code>SIF_SystemControlData</code>.
							</td>
        <td>
								 
							</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Place the requests that should be cancelled in <code>SIF_RequestMsgIds/SIF_RequestMsgId</code>.  While it
							is not used by the Push-Mode Agent, set the <code>NotificationType</code> to <code>None</code>.
							</td>
        <td>
								Send <code>SIF_Message</code> to Agent over appropriate transport.
							</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Receive <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> in response.
								Is <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a> present?
							</td>
        <td>If yes, go to Step 7.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								Is <code>SIF_Status/SIF_Code</code> <code>1</code>?
							</td>
        <td>If no, go to Step 6.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								The Agent has successfully acknowledged your <code>SIF_CancelRequests</code> and should have
								cancelled any corresponding response activity.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
      <tr>
        <td>6</td>
        <td>
								Messaging protocol has failed due to a <a href="CodeSets.html#InfrastructureStatusCodeType"><code>SIF_Status/SIF_Code</code></a> of
								<code>8</code> (Agent is asleep) or <code>7</code> (your ZIS sent a duplicate SIF_MsgId).
							</td>
        <td>Messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>7</td>
        <td>
								Messaging protocol has failed due to a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.  
							</td>
        <td>If the <code>SIF_Error</code> is a Generic Message Handling error, error code "Message not supported," go to Step 8.  
							Otherwise messaging protocol complete (failure).</td>
      </tr>
      <tr>
        <td>8</td>
        <td>
								The Agent does not support <code>SIF_CancelRequests</code>.
							</td>
        <td>Messaging protocol complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.1.5-1: SIF_CancelRequests Protocol</span>
    <a name="ZISMessageHandlingProtocols" />
    <h3>4.2.2 ZIS Message Handling Protocols</h3>
    <p>This section documents how Zone Integration Servers should respond to incoming messages, and the resulting post-conditions upon success or failure, along
				with any necessary steps to take.</p>
    <p>Note that in handling any <code>SIF_Message</code>, the ZIS can return a <code>SIF_Ack</code> with
				<code>SIF_Status/SIF_Code</code> <code>8</code> (receiver is sleeping) or <code>7</code> (already
				have this <code>SIF_MsgId</code> from you) if a duplicate message is detected.  These responses are omitted from the handling protocols below.</p>
    <a name="ZISMessageHandlingSIF_Message" />
    <h4>4.2.2.1 SIF_Message</h4>
    <p>When a message is received, the ZIS should first validate
the XML message. If the message is not <code>SIF_Register</code>, the ZIS should
determine whether the sender is registered in the zone. If errors are
found, a <code>SIF_Ack</code> with a <code>SIF_Error</code> element should be returned to the caller and no further processing should occur. 
If no errors are found, message processing proceeds according to message type. 
Subsequent message processing sections are assured of receiving well-formed and/or valid XML, 
and all non-<code>SIF_Register</code> message processing sections are assured that the agent is indeed registered with the zone.</p>
    <a name="Table42211SIF_MessageHandling" />
    <table title="SIF_Message Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Validate incoming XML message. Message validation is optional. The <code>Version</code> attribute of <code>SIF_Message</code> can be used 
							to indicate the appropriate message definition.</td>
        <td>If not performing message validation, go to Step 3 if XML is well-formed. If performing message validation, go to Step 3 if message is well-formed and valid.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. 
(Note that if XML is not well-formed, or invalid and the well-formed XML is not made available by the XML parser, 
<code>SIF_SourceId</code> and <code>SIF_MsgId</code> will not be available from the incoming XML message. 
If this is the case, include <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code> in the <code>SIF_Ack</code> as empty elements with xsi:nil set to true as necessary to indicate the current message.) Set <code>SIF_Error/SIF_Category</code> to indicate XML Validation and place the appropriate error code and description in <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code>. 
Place any additional parser information into <code>SIF_Error/SIF_ExtendedDesc</code>. Return the <code>SIF_Ack</code> to caller.
If it can be determined the message is a <code>SIF_Response</code>, see <code>SIF_Response</code> Handling below, Step 13, to send an error <code>SIF_Response</code> to the requester.</td>
        <td>Stop processing this message.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Examine the Version attribute of the message.</td>
        <td>If the version is supported, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. 
Set <code>SIF_Error/SIF_Category</code> to Generic Message Handling, indicating that the message is not supported in <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code>. 
Return the <code>SIF_Ack</code> to the caller.  If this message is a <code>SIF_Response</code>, see <code>SIF_Response</code> Handling below, Step 13, to send an error <code>SIF_Response</code> to the requester.</td>
        <td>Stop processing this message.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Examine message's <code>SIF_Header</code> to retrieve the <code>SIF_SourceId</code> and the message to get the message type. If message type is not <code>SIF_Register</code>, determine if the sender identified by <code>SIF_SourceId</code> is registered.</td>
        <td>If message type is <code>SIF_Register</code> or if the sender's <code>SIF_SourceId</code> is registered, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. 
Set <code>SIF_Error/SIF_Category</code> to Access and Permissions, indicating that the sender is not registered in <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code>. 
Return the <code>SIF_Ack</code> to the caller.  If this message is a <code>SIF_Response</code>, see <code>SIF_Response</code> Handling below, Step 13, to send an error <code>SIF_Response</code> to the requester.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Forward message to the proper handler based on the message type.</td>
        <td />
      </tr>
    </table>
    <span class="caption">Table 4.2.2.1-1: SIF_Message Handling</span>
    <a name="ZISMessageHandlingSIF_Register" />
    <h4>4.2.2.2 SIF_Register</h4>
    <p>Before an agent can participate in a zone, it must register itself in order to provide the data that the ZIS needs to interact with the agent. This process is handled using a <code>SIF_Register</code> message.</p>
    <a name="Table42221SIF_RegisterHandling" />
    <table title="SIF_Register Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>If ZIS implementation limits <code>SIF_SourceId</code> values in some way, examine <code>SIF_SourceId</code> and determine whether it is valid.</td>
        <td>If implementation allows any <code>SIF_SourceId</code> or if the <code>SIF_SourceId</code> is valid, go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Registration and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that <code>SIF_SourceId</code> is invalid. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing this message.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>If ZIS implementation requires previous permissions to register, examine <code>SIF_SourceId</code> and determine whether sender is permitted to register.</td>
        <td>If implementation allows any sender to register or if sender is permitted to register, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Access and Permissions and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the lack of permission to register. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing this message.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Examine <code>SIF_Version</code> element(s) and determine if the ZIS can handle the version(s).</td>
        <td>Go to Step 7 if the ZIS can handle the SIF version(s) specified by agent.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Registration and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that the ZIS cannot handle SIF messages in a version requested. Place the unsupported version in <code>SIF_Error/SIF_ExtendedDesc</code>. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing this message.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Examine <code>SIF_MaxBufferSize</code> and verify that it is greater than or equal to the minimum value for the ZIS.</td>
        <td>Go to Step 9 if <code>SIF_MaxBufferSize</code> is large enough.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Registration and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that the <code>SIF_MaxBufferSize</code> is too small to be supported by the ZIS. Return the <code>SIF_Ack</code> to the caller</td>
        <td>Stop processing this message.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>If the supplied value of <code>SIF_Mode</code> is <code>Push</code>, verify that the <code>SIF_Protocol</code> element is provided and that the protocol information appears sufficient for contacting the agent in Push mode and
							that the ZIS supports the <code>Accept-Encoding</code> <code>SIF_Protocol/SIF_Property</code>, if specified.</td>
        <td>Go to Step 11 if <code>SIF_Mode</code> is <code>Pull</code> or <code>SIF_Protocol</code> information appears valid.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Registration and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that the protocol is not supported, a secure transport is required,
							or that the ZIS does not support the supplied <code>Accept-Encoding</code> value. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing this message.</td>
      </tr>
      <tr>
        <td>11</td>
        <td>Store data from the <code>SIF_Register</code> message into the agent's database profile.</td>
        <td />
      </tr>
      <tr>
        <td>12</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Status</code> element indicating success,
							placing the agent's access control permissions in <code>SIF_Status/SIF_Data/SIF_AgentACL</code>. 
							Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing this message.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.2-1: SIF_Register Handling</span>
    <p>An agent may also send the <code>SIF_Register</code> message when already registered. In this case, the ZIS should re-register the agent in the same manner as defined for initial registration. Any existing provision and subscription entries, as well as any pending messages, maintained by the ZIS for the agent should remain intact. Upon successful re-registration, any new or updated registration settings for the agent, including push mode protocol information, take effect after the ZIS has returned a successful <code>SIF_Ack</code> for the <code>SIF_Register</code> message.</p>
    <a name="ZISMessageHandlingSIF_Unregister" />
    <h4>4.2.2.3 SIF_Unregister</h4>
    <p>When an agent is going be removed from a Zone, the agent must send a <code>SIF_Unregister</code> message. When a ZIS receives this message from an agent, it performs those steps—ignoring <code>SIF_Ack</code> preparation and delivery—outlined for the <code>SIF_Unprovide</code> and <code>SIF_Unsubscribe</code> messages for any agent provisions or subscriptions, respectively. The ZIS then discards any messages pending for the agent. The ZIS will also remove any registration information and remove the agent from its list of registered agents.</p>
    <p>It is recommended that the ZIS not remove access control data from its database as a replacement agent may be installed. Keeping the access permissions is optional, however.</p>
    <a name="Table42231SIF_UnregisterHandling" />
    <table title="SIF_Unregister Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Examine message and retrieve the <code>SIF_SourceId</code> of the message. The ZIS must remove the agent from its list of registered agents. Perform <code>SIF_Unprovide</code> functionality for any objects the agent is providing. Perform <code>SIF_Unsubscribe</code> functionality for any objects to which the agent is subscribed. Discard any pending messages for the agent.</td>
        <td />
      </tr>
      <tr>
        <td>2</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Status</code> element indicating success. Return the <code>SIF_Ack</code> to caller.</td>
        <td>Stop processing the message.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.3-1: SIF_Unregister Handling</span>
    <a name="ZISMessageHandlingSIF_Provide" />
    <h4>4.2.2.4 SIF_Provide</h4>
    <p>An agent makes an object available to be requested by a process called Provision that is represented by the <code>SIF_Provide</code> message.</p>
    <p>The <code>SIF_Provide</code> message can contain provision requests for multiple objects. 
The ZIS must treat all of the objects as a set; if there is an error with one of the objects then there should be no change to the Providers database.</p>
    <a name="Table42241SIF_ProvideHandling" />
    <table title="SIF_Provide Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <code>SIF_Ack</code>.</td>
        <td>Go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Examine the message to determine whether any more objects are being provided.</td>
        <td>Go to Step 11 if there are no further object provisions to process for this message.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Retrieve the name of the next object to be provided. If not otherwise performed in initial message validation, check whether the object name is valid (e.g. valid/supported object, not <code>SIF_ZoneStatus</code>).</td>
        <td>If object name is valid, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>. Set <code>SIF_Error/SIF_Category</code> to indicate Provision and set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the object is invalid. Place the name of the invalid object in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 14.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>If no <code>SIF_Context</code> is specified, the context is <code>SIF_Default</code>.  Otherwise check that each <code>SIF_Context</code> supplied in <code>SIF_Contexts</code> is supported.</td>
        <td>If they are all supported, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Generic Message Handling. 
						Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate a context is not supported. Place the name of the context in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 14.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Using the <code>SIF_SourceId</code>, consult the ACL to determine if the sender has the proper access and permissions for this object in each of the specified contexts.</td>
        <td>If sender has the proper access and permissions, go to Step 9.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Access and Permissions. Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the sender lacks permission to provide this object. Place the name of the object in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 14.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Check the Providers database to see if this object has already been provided in the contexts specified.</td>
        <td>If the object does not have a provider in the contexts specified, go to Step 11.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Is the current provider the same as the <code>SIF_SourceId</code> of this message?</td>
        <td>If the provider differs from the <code>SIF_SourceId</code> of this message, go to Step 14. Otherwise go to Step 2.</td>
      </tr>
      <tr>
        <td>11</td>
        <td>Add a record in the Providers database to indicate that <code>SIF_SourceId</code> is the provider of this object in the given contexts. 
							If an error occurs, add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>.</td>
        <td>If an error occurs, go to Step 13; otherwise go to Step 2.</td>
      </tr>
      <tr>
        <td>12</td>
        <td>Add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>. Set <code>SIF_Error/SIF_Category</code> to indicate Provision and set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to 
							indicate that the object already has a provider. Place the name of the provider in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 14.</td>
      </tr>
      <tr>
        <td>13</td>
        <td>Add a <code>SIF_Status</code> element indicating success to the <code>SIF_Ack</code>. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>14</td>
        <td>Undo all changes to the Providers database. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.4-1: SIF_Provide Handling</span>
    <a name="ZISMessageHandlingSIF_Unprovide" />
    <h4>4.2.2.5 SIF_Unprovide</h4>
    <p>If an agent wishes to withdraw an object previously provided, the <code>SIF_Unprovide</code> message is used.</p>
    <p>The <code>SIF_Unprovide</code> message can contain multiple objects. 
The ZIS must treat all of the objects as a set; if there is an error with one of the objects then there should be no change to the Providers database.</p>
    <a name="Table42251SIF_UnprovideHandling" />
    <table title="SIF_Unprovide Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <code>SIF_Ack</code>.</td>
        <td>Go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Examine the message to determine whether any more objects are being unprovided.</td>
        <td>Go to Step 7 if there are no further objects to process for this message.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Examine the message and retrieve the name of an object to be unprovided. If not otherwise performed in initial message validation, check whether the object name is valid (e.g. valid/supported object, not <code>SIF_ZoneStatus</code>).</td>
        <td>Go to Step 5 if the object name is valid.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>. Set <code>SIF_Error/SIF_Category</code> to indicate Provision and set 
							<code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the object is invalid. Place the name of the invalid object in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 10.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>If no <code>SIF_Context</code> is specified, the context is <code>SIF_Default</code>.  Otherwise check that each <code>SIF_Context</code> supplied in <code>SIF_Contexts</code> is supported.</td>
        <td>If they are all supported, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Generic Message Handling. 
						Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate a context is not supported. Place the name of the context in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 10.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>If it exists, remove the records in the Providers database that marks <code>SIF_SourceId</code> as the provider of this object for the given contexts. 
							If an error occurs, add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>.</td>
        <td>If an error occurs, go to Step 10.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Leave all pending <code>SIF_Request</code>s for the object in the responder's queue, 
							as they may include <code>SIF_Request</code>s routed explicitly to the responder using <code>SIF_DestinationId</code>.</td>
        <td>Go to Step 2.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Add a <code>SIF_Status</code> element indicating success to the <code>SIF_Ack</code>. Return the <code>SIF_Ack</code> to the caller</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Undo all changes to the Providers database. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.5-1: SIF_Unprovide Handling</span>
    <a name="ZISMessageHandlingSIF_Subscribe" />
    <h4>4.2.2.6 SIF_Subscribe</h4>
    <p>An agent requests to receive <code>SIF_Event</code>s for an object by a process called Subscription that is represented by the <code>SIF_Subscribe</code> message. 
</p>
    <p>The <code>SIF_Subscribe</code> message can contain subscription requests for multiple objects. 
The ZIS must treat all of the objects as a set, if there is an error with one of the objects then there should be no change to the Subscribers database.</p>
    <a name="Table42261SIF_SubscribeHandling" />
    <table title="SIF_Subscribe Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <code>SIF_Ack</code>.</td>
        <td>Go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Examine the message to determine whether any more subscriptions need to be processed.</td>
        <td>Go to Step 9 if there are no further subscriptions to process in this message.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Retrieve the name of the next object to be subscribed to. If not otherwise performed in initial message validation, check whether the object name is valid (e.g., valid/supported object with events reported).</td>
        <td>If the object name is valid, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>. Set <code>SIF_Error/SIF_Category</code> to indicate Subscription and set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the object is invalid. Place the name of the invalid object in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 12.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>If no <code>SIF_Context</code> is specified, the context is <code>SIF_Default</code>.  Otherwise check that each <code>SIF_Context</code> supplied in <code>SIF_Contexts</code> is supported.</td>
        <td>If they are all supported, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Generic Message Handling. 
						Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate a context is not supported. Place the name of the context in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 12.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Using the <code>SIF_SourceId</code>, consult the ACL to determine if the sender has the proper access and permissions for this object and contexts.</td>
        <td>If sender has the proper access and permissions, go to Step 9.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Access and Permissions. Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the sender lacks permission to subscribe to this object. Place the name of the object in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 12.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Check the Subscribers database to see if the caller is already subscribed to this object for the specified contexts.</td>
        <td>If the caller is already subscribed to this object, go to Step 2.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Add a record in the Subscribers database to indicate that <code>SIF_SourceId</code> is a subscriber of this object's <code>SIF_Event</code>s in the specified contexts. 
							If an error occurs, add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>.</td>
        <td>If an error occurs go to Step 12; otherwise go to Step 2.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Add a <code>SIF_Status</code> element indicating success to the <code>SIF_Ack</code>. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>12</td>
        <td>Undo all changes to the Subscribers database. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.6-1: SIF_Subscribe Handling</span>
    <a name="ZISMessageHandlingSIF_Unsubscribe" />
    <h4>4.2.2.7 SIF_Unsubscribe</h4>
    <p>If an agent wishes to cancel one or more subscriptions, the <code>SIF_Unsubscribe</code> message is used. Events already queued for delivery prior to unsubscription will be delivered.</p>
    <p>The <code>SIF_Unsubscribe</code> message can contain subscription requests for multiple objects. The ZIS must treat all of the objects as a set, if there is an error with one of the objects then there should be no change to the Subscribers database.</p>
    <a name="Table42271SIF_UnsubscribeHandling" />
    <table title="SIF_Unsubscribe Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <code>SIF_Ack</code>.</td>
        <td>Go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Examine the message to determine whether any more unsubscriptions need to be processed.</td>
        <td>Go to Step 6 if there are no further objects to process in the message.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Retrieve the name of the next object. If not otherwise performed in initial message validation, check whether the object name is valid (e.g. valid/supported object with events reported).</td>
        <td>If the object name is valid, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>. Set <code>SIF_Error/SIF_Category</code> to indicate Subscription and set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the object is invalid. Place the name of the invalid object in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 9.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>If no <code>SIF_Context</code> is specified, the context is <code>SIF_Default</code>.  Otherwise check that each <code>SIF_Context</code> supplied in <code>SIF_Contexts</code> is supported.</td>
        <td>If they are all supported, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Generic Message Handling. 
						Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate a context is not supported. Place the name of the context in <code>SIF_Error/SIF_ExtendedDesc</code>.</td>
        <td>Go to Step 12.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>If it exists, remove the record in the Subscribers database that marks <code>SIF_SourceId</code> as a subscriber of this object's <code>SIF_Event</code>s in the specified contexts. If an error occurs, add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>.</td>
        <td>If an error occurs go to Step 9, otherwise go to Step 2.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Add a <code>SIF_Status</code> element indicating success to the <code>SIF_Ack</code>. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Undo all changes to the Subscribers database. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.7-1: SIF_Unsubscribe Handling</span>
    <a name="ZISMessageHandlingSIF_Provision" />
    <h4>4.2.2.8 SIF_Provision</h4>
    <p>An Agent is registering its support for various messages with regard to various objects.  Settings supplied replace any
previously recorded settings for the Agent.</p>
    <a name="Table42281SIF_ProvisionHandling" />
    <table title="SIF_Provision Handling">
      <thead>
        <tr>
          <th>Step</th>
          <th>Process</th>
          <th>Flow Control</th>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare <code>SIF_Ack</code>.</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>Process <code>SIF_ProvideObjects</code> as provide.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Process objects not in <code>SIF_ProvideObjects</code> as unprovide.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Process <code>SIF_SubscribeObjects</code> as subscribe.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Process objects not in <code>SIF_SubscribeObjects</code> as unsubscribe.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Process <code>SIF_PublishAddObjects</code>.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Process <code>SIF_PublishChangeObjects</code>.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Process <code>SIF_PublishDeleteObjects</code>.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Process <code>SIF_RequestObjects</code>.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Process <code>SIF_RespondObjects</code>.</td>
        <td>On error go to step 13.</td>
      </tr>
      <tr>
        <td>11</td>
        <td>Save changes.</td>
        <td> </td>
      </tr>
      <tr>
        <td>12</td>
        <td>Return success <code>SIF_Ack</code>.</td>
        <td>Stop processing.</td>
      </tr>
      <tr>
        <td>13</td>
        <td>Roll back any changes.</td>
        <td> </td>
      </tr>
      <tr>
        <td>14</td>
        <td>Return error <code>SIF_Ack</code>.</td>
        <td>Stop processing.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.8-1: SIF_Provision Handling</span>
    <a name="ZISMessageHandlingSIF_Event" />
    <h4>4.2.2.9 SIF_Event</h4>
    <p>When an application has made a change in an object that is part of the Zone and for which the application has declared the ability to generate <code>SIF_Event</code>s, 
the agent will send a <code>SIF_Event</code> message to its Zone Integration Server so the framework may distribute it.</p>
    <a name="Table42291SIF_EventHandling" />
    <table title="SIF_Event Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Examine message and retrieve the name of the object. Check whether the object name is valid (e.g. valid/supported object with events reported).</td>
        <td>If object name is valid, go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>. Set <code>SIF_Error/SIF_Category</code> to indicate Event Reporting and set 
<code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the event is invalid. 
Place the name of the invalid object in <code>SIF_Error/SIF_ExtendedDesc</code>. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>If no <code>SIF_Context</code> is specified, the context is <code>SIF_Default</code>.  Otherwise check that each <code>SIF_Context</code> supplied in <code>SIF_Contexts</code> is supported.</td>
        <td>If they are all supported, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Generic Message Handling. 
						Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate a context is not supported. Place the name of the context in <code>SIF_Error/SIF_ExtendedDesc</code>.
 Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Using the <code>SIF_SourceId</code>, consult the ACL to determine if the sender has the proper access and permissions for this object in the specified contexts.</td>
        <td>If sender has the proper access and permissions, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Access and Permissions. Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the sender lacks permission to publish events pertaining to this object (use general <code>SIF_Event</code> error code, or specific Add, Change, Delete codes). Place the name of the object in <code>SIF_Error/SIF_ExtendedDesc</code>. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Check the Subscriber database to see if there are any subscribers in the specified contexts for the <code>SIF_Event</code>.</td>
        <td>Go to Step 9 if there are no subscribers for this object.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>
                Create a new message for this <code>SIF_Event</code> and place a copy into each subscribing agent's queue.  If more than
								one context is specified for the event, only one copy of the event is placed in the subscribing agent's queue. 
                If the event cannot be placed into an individual agent's queue due to the agent's maximum buffer size or 
                because the subscribing agent does not support the message version of the <code>SIF_Event</code>, 
                it is recommended that the ZIS log the inability to deliver the event. 
                In addition, the ZIS <span class="rfc2119">MUST</span> report a <code>SIF_LogEntry</code> event with the appropriate error category and code, 
                containing a copy of the <code>SIF_Header</code> from the original message. 
                <code>SIF_LogEntry/SIF_Desc</code> must contain the SourceId of the agent that has failed to receive the message.
              </td>
        <td />
      </tr>
      <tr>
        <td>9</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Status</code> element indicating success. Return a <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.9-1: SIF_Event Handling</span>
    <a name="ZISMessageHandlingSIF_Request" />
    <h4>4.2.2.10 SIF_Request</h4>
    <p>When an agent needs information from a Zone context it sends a <code>SIF_Request</code> message to the ZIS. 
If the <code>SIF_Request</code>'s header does not contain a <code>SIF_DestinationId</code> element, the ZIS will route the message to the Provider of the object referenced in the <code>SIF_Request</code>. 
If the header contains a <code>SIF_DestinationId</code>, the ZIS will route the message to the application referenced in the <code>SIF_DestinationId</code> if the security policies of the zone permit such routing. The ZIS will return a <code>SIF_Ack</code> message to the requesting agent to indicate whether or not it was able to process the <code>SIF_Request</code> message.</p>
    <p>After the ZIS returns a success <code>SIF_Ack</code> to the requester, the ZIS will route the <code>SIF_Request</code> to the responder and the requesting agent may expect to receive one or more <code>SIF_Response</code> messages sent by the responder. However, the responder may not be currently on-line or it may not be able to immediately satisfy the <code>SIF_Request</code>. Therefore, requesting agents must not depend upon a timely response to their <code>SIF_Request</code>.</p>
    <p>If the ZIS returns an error <code>SIF_Ack</code>, the requesting agent will not receive any <code>SIF_Response</code> messages from a responder.</p>
    <a name="Table422101SIF_RequestHandling" />
    <table title="SIF_Request Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <code>SIF_Ack</code>.</td>
        <td />
      </tr>
      <tr>
        <td>2</td>
        <td>Retrieve the name of the object from the <code>ObjectName</code> attribute of <code>SIF_Query/SIF_QueryObject</code> and check whether it's a valid/supported object.</td>
        <td>Go to Step 4 if the object name is valid.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>. Set <code>SIF_Error/SIF_Category</code> to indicate Request and Response and set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the object name is invalid. Place the name of the invalid object in <code>SIF_Error/SIF_ExtendedDesc</code>. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>If no <code>SIF_Context</code> is specified, the context is <code>SIF_Default</code>.  Otherwise check that the context supplied in <code>SIF_Contexts</code> is supported.  If more
							than one context is specified, go to Step 5.</td>
        <td>If the context is supported, go to Step 6.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Generic Message Handling. 
						Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate a specified context is not supported or that multiple contexts are not supported,
depending on the error. Place the name of the context in <code>SIF_Error/SIF_ExtendedDesc</code>.
 Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Using the <code>SIF_SourceId</code>, consult the ACL to determine if the sender has the proper access and permissions for this object in the applicable contexr.</td>
        <td>If sender has the proper access and permissions, go to Step 8.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element. Set <code>SIF_Error/SIF_Category</code> to indicate Access and Permissions. Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the sender lacks permission to request this object. Place the name of the object in <code>SIF_Error/SIF_ExtendedDesc</code>. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Examine the <code>SIF_Request</code> header looking for a <code>SIF_DestinationId</code></td>
        <td>Go to Step 11 if a <code>SIF_DestinationId</code> was located.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>No <code>SIF_DestinationId</code> was found. Examine the Providers database to locate the responder for the requested object in the applicable context.</td>
        <td>Go to Step 12 if a Provider was located.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Add a <code>SIF_Error</code> element with the <code>SIF_Error/SIF_Category</code> set to indicate Request and Response and <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate that no provider was found. Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>11</td>
        <td>A <code>SIF_DestinationId</code> was specified indicating the responder. Confirm that the agent specified in <code>SIF_DestinationId</code> has permission to send <code>SIF_Response</code> messages for the requested data object in 
							the applicable context.</td>
        <td>Go to Step 10 if the agent does not have the necessary permission.</td>
      </tr>
      <tr>
        <td>12</td>
        <td>If it can be determined from ACL settings or settings recorded by <code>SIF_Provision</code> and/or <code>SIF_Provide</code> that the Responder 
							cannot handle
							a <code>SIF_Query</code> for a given object or <code>SIF_ExtendedQuery</code> for any referenced object, or that the Responder doesn't handle
							extended queries in general, add a <code>SIF_Error</code> element with the applicable <code>SIF_Error/SIF_Category</code> and <code>SIF_Error/SIF_Code</code> (object not supported,
							query not supported, or <code>SIF_ExtendedQuery</code> not supported).  Place an appropriate error message in <code>SIF_Desc</code> and/or <code>SIF_ExtendedDesc</code>.
							Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>13</td>
        <td>
								Deposit the <code>SIF_Request</code> in the responder's queue.
								If the request cannot be placed into an individual agent's queue due to the agent's maximum buffer size or because the destination agent
								does not support the message version of the <code>SIF_Request</code>, it is recommended that the ZIS log the inability to deliver the request.
								In addition, the ZIS <span class="rfc2119">MUST</span> report a <code>SIF_LogEntry</code> event with the appropriate error category and code,
								containing a copy of the <code>SIF_Header</code> from this message.  <code>SIF_LogEntry/SIF_Desc</code> <span class="rfc2119">MUST</span> 
								contain the SourceId of the agent that has failed to receive the request.
							</td>
        <td />
      </tr>
      <tr>
        <td>14</td>
        <td>Return a <code>SIF_Ack</code>, with <code>SIF_Status</code> set to <code>0</code>, to the caller to indicate that <code>SIF_Request</code> has been sent.</td>
        <td>Stop processing the message.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.10-1: SIF_Request Handling</span>
    <a name="ZISMessageHandlingSIF_Response" />
    <h4>4.2.2.11 SIF_Response</h4>
    <p>When receiving a <code>SIF_Response</code> packet from an agent responding to a <code>SIF_Request</code>, the ZIS <span class="rfc2119">MUST</span> perform the validation
				protocol below.</p>
    <a name="Table422111SIF_ResponseHandling" />
    <table title="SIF_Response Handling">
      <thead>
        <tr>
          <th>Step</th>
          <th>Process</th>
          <th>Flow Control</th>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <code>SIF_Ack</code>.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>Using the supplied <code>SIF_RequestMsgId</code>, look up the <code>SIF_Request</code> that initiated this response. </td>
        <td>Go to Step 4 if the <code>SIF_Request</code> is found.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Add a <code>SIF_Error</code> element to the <code>SIF_Ack</code>.  Set <code>SIF_Error/SIF_Category</code> to indicate Request and Response and set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the <code>SIF_RequestMsgId</code> is invalid.  Place <code>SIF_RequestMsgId</code> in <code>SIF_Error/SIF_ExtendedDesc</code>.  Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Stop processing the message.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>Examine the <code>SIF_MaxBufferSize</code> specified in the <code>SIF_Request</code> message and compare it to the size of the <code>SIF_Response</code> packet.</td>
        <td>If the <code>SIF_Response</code> packet is smaller than or equal to the <code>SIF_MaxBufferSize</code> specified in the original request, go to Step 6.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element.  Set <code>SIF_Error/SIF_Category</code> to indicate indicate Request and Response.  Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the <code>SIF_MaxBufferSize</code> is incorrect.  Place a description of the <code>SIF_MaxBufferSize</code> and the actual size of the message received in <code>SIF_Error/SIF_ExtendedDesc</code>.  Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Go to step 13.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>Examine the <code>SIF_DestinationId</code> specified in the <code>SIF_Response</code> and compare it to the <code>SIF_SourceId</code> of the original request.</td>
        <td>If the <code>SIF_DestinationId</code> is correct, go to Step 8.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element.  
Set <code>SIF_Error/SIF_Category</code> to indicate indicate Request and Response.  
Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the <code>SIF_DestinationId</code> is incorrect.  
Place a description of the <code>SIF_DestinationId</code> specified and the <code>SIF_DestinationId</code> expected in <code>SIF_Error/SIF_ExtendedDesc</code>.  
Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Go to step 13.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>Examine the <code>SIF_PacketNumber</code> specified in the <code>SIF_Response</code>. 
If this is the first <code>SIF_Response</code> packet received, the <code>SIF_PacketNumber</code> must be set to a value of <code>1</code>. 
Subsequent packets must be received in order with the <code>SIF_PacketNumber</code> set to <code>1 +</code> the previous <code>SIF_PacketNumber</code>.</td>
        <td>If the <code>SIF_PacketNumber</code> is correct, go to Step 10.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element.  
Set <code>SIF_Error/SIF_Category</code> to indicate indicate Request and Response.  
Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the <code>SIF_PacketNumber</code> is incorrect.  
Place a description of the <code>SIF_PacketNumber</code> specified and the <code>SIF_PacketNumber</code> expected in <code>SIF_Error/SIF_ExtendedDesc</code>.  
Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Go to step 13.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>Examine the <code>SIF_Version</code> specified in the <code>SIF_Response</code> and compare it to the <code>SIF_Version</code>s allowed in the original request.</td>
        <td>If the SIF version matches one of the SIF Versions requested in the <code>SIF_Request</code>, go to Step 12.</td>
      </tr>
      <tr>
        <td>11</td>
        <td>Prepare a <code>SIF_Ack</code> containing a <code>SIF_Error</code> element.  Set <code>SIF_Error/SIF_Category</code> to indicate Request and Response.  Set <code>SIF_Error/SIF_Code</code> and <code>SIF_Error/SIF_Desc</code> to indicate the <code>SIF_Version</code> is incorrect.  Place a description of the version of the <code>SIF_Response</code> and versions allowed by the <code>SIF_Request</code> in <code>SIF_Error/SIF_ExtendedDesc</code>.  Return the <code>SIF_Ack</code> to the caller.</td>
        <td>Go to step 13.</td>
      </tr>
      <tr>
        <td>12</td>
        <td>Place the <code>SIF_Response</code> packet in the requesting agent's queue.</td>
        <td>Message processing is complete.  Stop processing the message.</td>
      </tr>
      <tr>
        <td>13</td>
        <td>
          <p>Prepare a <code>SIF_Response</code> message with <code>SIF_DestinationId</code> set to <code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to <code>SIF_MsgId</code> from the <code>SIF_Request</code> message.</p>
          <p>Add a <code>SIF_Error</code> element with the <code>SIF_Error/SIF_Category</code> set to indicate Request and Response and <code>SIF_Error/SIF_Code</code> and 
<code>SIF_Error/SIF_Desc</code> to indicate the reason that the <code>SIF_Response</code> packet was rejected.</p>
          <p>Add <code>SIF_PacketNumber</code> with a value set to set to <code>1 +</code> the previous <code>SIF_PacketNumber</code> and <code>SIF_MorePackets</code> to <code>No</code>.</p>
          <p>
	Send the <code>SIF_Response</code> to the original requester.
	In addition, the ZIS <span class="rfc2119">MUST</span> report a <code>SIF_LogEntry</code> event with the appropriate error category and code,
	containing a copy of the <code>SIF_Header</code> from the request.  <code>SIF_LogEntry/SIF_ExtendedDesc</code> should contain information about why the 
	message failed <code>SIF_Response</code> validation.
</p>
        </td>
        <td>
          <p>Stop processing the message.</p>
          <p>The ZIS must also guarantee that no additional <code>SIF_Response</code> packets for this <code>SIF_Request</code> will be accepted. Depending on the implementation, the ZIS may need to alter the <code>SIF_Request</code> cache it maintains to signal that the <code>SIF_Request</code> is no longer valid.</p>
          <p>
The ZIS may remove the <code>SIF_Request</code> from the cache as the stream is closed.
</p>
        </td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.11-1: SIF_Response Handling</span>
    <a name="ZISMessageHandlingSIF_ResponseImplementationNotes" />
    <h5>4.2.2.11.1 Implementation Notes</h5>
    <p>The ZIS must maintain a reliable list of all open <code>SIF_Request</code>s in order to satisfy the Quality of Service validations that are applied to <code>SIF_Response</code>s above. It is envisioned that once a <code>SIF_Response</code> has been completed, either by receiving the last packet or by failing one of the validations applied below, knowledge of the initiating <code>SIF_Request</code> will no longer need to be maintained by the ZIS. If the responding agent attempts to send any more <code>SIF_Response</code>s for a failed <code>SIF_Request</code>, it will automatically fail at Step 2 and get the error response specified in Step 3. Notification of the failed <code>SIF_Response</code> would have already been sent to the requesting agent.</p>
    <p>There remain three cases where a requesting agent will not receive a complete <code>SIF_Response</code> for a request.</p>
    <ol>
      <li>The responding agent never replies with a <code>SIF_Response</code>.</li>
      <li>The responding agent starts replying, but never finishes the <code>SIF_Response</code> by sending a <code>SIF_Response</code> with the <code>SIF_MorePackets</code> element set to "No".</li>
      <li>The responding agent attempts a reply with a <code>SIF_Response</code> but the ZIS is unable to parse the message enough to read the <code>SIF_RequestMsgId</code>. If this case occurs, and the responding agent sends a subsequent <code>SIF_Response</code> that is parseable, it is likely that the requesting agent will be notified of the problem because subsequent <code>SIF_Response</code> packets will not pass the <code>SIF_PacketNumber</code> validation.</li>
    </ol>
    <p>Management of the <code>SIF_Request</code> cache that is maintained by the ZIS is left up to the ZIS implementation. The ZIS is required to maintain the <code>SIF_Request</code>s for a reasonable amount of time. If the ZIS eventually removes <code>SIF_Request</code>s that have been cached for a long period of time, that option must be able to be configured by the ZIS administrator.</p>
    <p>
When an open request cache entry is removed by the administrator or a timeout of the record, the ZIS should publish a <code>SIF_LogEntry</code> and a <code>SIF_Response/SIF_Error</code> indicating the reason it was removed.
</p>
    <a name="ZISMessageHandlingSIF_Ping" />
    <h4>4.2.2.12 SIF_Ping</h4>
    <p>
						An Agent is pinging your ZIS to see if it is reachable, "awake" and/or processing messages.
					</p>
    <a name="Table422121SIF_PingHandling" />
    <table title="SIF_Ping Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
								in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
								respectively.  If your ZIS is "awake," include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
								of <code>0</code> (success).  Otherwise you may optionally notify the Agent that
								your ZIS is asleep by returning a <code>SIF_Code</code> of <code>8</code> (receiver is sleeping).
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Return the <code>SIF_Ack</code> to the Agent.
							</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.12-1: SIF_Ping Handling</span>
    <a name="ZISMessageHandlingSIF_Sleep" />
    <h4>4.2.2.13 SIF_Sleep</h4>
    <p>
						The Agent wants its state changed to "asleep." Upon successful state change, your
						ZIS <span class="rfc2119">SHOULD</span> avoid sending messages to a Push-Mode Agent until receipt of a <code>SIF_Wakeup</code> message
						or that Agent re-registers, or be prepared to handle transport errors or the aforementioned acknowledgement.  Whether the
						Agent is registered in Push or Pull mode, this state is communicated
						to other Agents in <code>SIF_ZoneStatus</code> and <span class="rfc2119">MUST</span> be persisted accordingly.  In addition to sending
						a <code>SIF_Wakeup</code> or <code>SIF_Register</code>, a Pull-Mode Agent can also change its state to "awake" by sending a
						<code>SIF_GetMessage</code>.
					</p>
    <a name="Table422131SIF_SleepHandling" />
    <table title="SIF_Sleep Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
								in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
								respectively.  Include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
								of <code>0</code> (success).  Change the state of the Agent to "asleep."
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Return the <code>SIF_Ack</code> to the Agent.
							</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.13-1: SIF_Sleep Handling</span>
    <a name="ZISMessageHandlingSIF_Wakeup" />
    <h4>4.2.2.14 SIF_Wakeup</h4>
    <p>An Agent wants its state changed to "awake," notifying the ZIS and other Agents of the state change.  A ZIS <span class="rfc2119">MUST</span>
					persist this state in order to communicate it to other Agents via <code>SIF_ZoneStatus</code>.  When a Push-Mode Agent changes its state
					to "awake," the ZIS may also resume delivery of queued messages to the Agent.
				</p>
    <a name="Table422141SIF_WakeupHandling" />
    <table title="SIF_Wakeup Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
								in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
								respectively.  Include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
								of <code>0</code> (success).  Change the Agent's state to "awake."
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Return the <code>SIF_Ack</code> to the Agent.
							</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.14-1: SIF_Wakeup Handling</span>
    <a name="ZISMessageHandlingSIF_GetZoneStatus" />
    <h4>4.2.2.15 SIF_GetZoneStatus</h4>
    <p>
						An Agent is requesting the status of the zone.
					</p>
    <a name="Table422151SIF_GetZoneStatusHandling" />
    <table title="SIF_GetZoneStatus Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
								in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
								respectively.  Include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
								of <code>0</code> (success).  Reflect the current state of the zone in <code>SIF_Status/SIF_Data/SIF_ZoneStatus</code>.
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Return the <code>SIF_Ack</code> to the Agent.
							</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.15-1: SIF_GetZoneStatus Handling</span>
    <a name="ZISMessageHandlingSIF_GetAgentACL" />
    <h4>4.2.2.16 SIF_GetAgentACL</h4>
    <p>
						An Agent is requesting its access control permissions.
					</p>
    <a name="Table422161SIF_GetZoneStatusHandling" />
    <table title="SIF_GetZoneStatus Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
								in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
								respectively.  Include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
								of <code>0</code> (success).  Communicate the Agent's ACL permissions in <code>SIF_Status/SIF_Data/SIF_AgentACL</code>.
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								Return the <code>SIF_Ack</code> to the Agent.
							</td>
        <td>Message processing complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.16-1: SIF_GetZoneStatus Handling</span>
    <a name="ZISMessageHandlingSIF_CancelRequests" />
    <h4>4.2.2.17 SIF_CancelRequests</h4>
    <p>
						If an Agent abandons or restarts a data
					collection using <code>SIF_Request</code>s, whether or not the response stream has started, it is <span class="rfc2119">RECOMMENDED</span>
					that it send one or more <code>SIF_CancelRequests</code> messages to the ZIS.  
					Upon receipt of the <code>SIF_CancelRequests</code> message, the ZIS deletes corresponding <code>SIF_Request</code>
					messages from Agent queues and deletes its own state/tracking information regarding each request.  Doing the latter
					ensures that if a Responder is still processing a request, the ZIS effectively ends the response stream upon receipt
					of the next <code>SIF_Response</code> packet by returning a <code>SIF_Error</code> with a <code>SIF_Category</code>
					of <code>8</code> (Request and Response Error) and a <code>SIF_Code</code> of <code>10</code> (invalid SIF_RequestMsgId
					specified in SIF_Response).  No changes to responding Agent behaviors are required as all agents in the SIF 2.x
					lifecycle have the capability to handle this error state.</p>
    <p>When cancelling <code>SIF_Request</code>s, the ZIS also has the ability to send a <code>SIF_CancelRequests</code>
					message to Push-Mode Agents.  Pull-Mode Responders cannot receive these messages, but any pending response handling
					is cancelled per the ZIS behavior above.  When dealing with Push-Mode Agents, ZIS implementations must bear in mind 
					that support for this message is optional for Push-Mode Agents.</p>
    <p>When a cancelling Agent specifies a <code>NotificationType</code> of <code>Standard</code>, it is the responsibility
					of the ZIS to end the response stream to the requesting Agent by sending a <code>SIF_Response</code> packet with
					a <code>SIF_MorePackets</code> of <code>No</code> on the Responder's behalf.</p>
    <a name="Table422171SIF_CancelRequestsHandling" />
    <table title="SIF_CancelRequests Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
								in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
								respectively.  Include a <code>SIF_Status</code> element with a <code>SIF_Code</code>
								of <code>0</code> (success).  Return the <code>SIF_Ack</code> to the Agent.  (There are no
								error return values that apply to this message.)
							</td>
        <td>Go to Step 2.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								For each <code>SIF_RequestMsgId</code> element, perform the following steps.
							</td>
        <td>If all <code>SIF_RequestMsgId</code> elements have been processed, processing is complete.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Using the supplied <code>SIF_RequestMsgId</code>, look up the <code>SIF_Request</code> that initiated
								this response.
							</td>
        <td>Go to Step 2 if the <code>SIF_Request</code> is not found, or has already been completed
							with a "final" <code>SIF_Response</code> packet (<code>SIF_MorePackets</code> = <code>No</code>).</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								Examine the <code>SIF_SourceId</code> specified in the <code>SIF_Request</code> message and compare
								it to the <code>SIF_SourceId</code> in the <code>SIF_SystemControl</code> message.
							</td>
        <td>If the <code>SIF_SourceId</code> is not the same, go to Step 2.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								Close out the <code>SIF_Request</code> tracking state for the request so that no further tracking is
								performed.
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>6</td>
        <td>
								If the responding Agent has already received the request and is running in Push mode, send a
								<code>SIF_CancelRequests</code> message to that Agent.  (Note: This could also be accomplished
								by packaging up all <code>SIF_RequestMsgId</code>s that apply to the same responding Agent and
								sending a single <code>SIF_CancelRequests</code> message.)
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>7</td>
        <td>
								Examine the value of <code>SIF_NotificationType</code>.
							</td>
        <td>If set to <code>Standard</code>, go to Step 8.  If set to <code>None</code>, go to Step 10.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>
								Prepare a <code>SIF_Response</code> message with <code>SIF_DestinationId</code> set to
								<code>SIF_SourceId</code> and <code>SIF_RequestMsgId</code> set to <code>SIF_MsgId</code>
								from the <code>SIF_Request</code> message.
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>9</td>
        <td>
          <p>Add a <code>SIF_Error</code> element with the <code>SIF_Category</code> set to
								indicate Request and Response, with <code>SIF_Code</code> and <code>SIF_Desc</code> indicating
								<code>18</code> (SIF_Request cancelled by requesting agent).</p>
          <p>Add <code>SIF_PacketNumber</code> with a value set to the previous <code>SIF_PacketNumber + 1</code>.
								Set <code>SIF_MorePackets</code> to <code>No</code>.</p>
          <p>Place the <code>SIF_Response</code> in the requester's queue.</p>
        </td>
        <td> </td>
      </tr>
      <tr>
        <td>10</td>
        <td>
								Determine if there are any more <code>SIF_RequestMsgId</code> elements left to process.
							</td>
        <td>Go to Step 2 if there are more <code>SIF_RequestMsgId</code> elements, otherwise processing is complete.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.17-1: SIF_CancelRequests Handling</span>
    <a name="ZISMessageHandlingSIF_GetMessage" />
    <h4>4.2.2.18 SIF_GetMessage</h4>
    <p>
						A Pull-Mode Agent is requesting the next message in its queue.
					</p>
    <a name="Table422181SIF_GetMessageHandling" />
    <table title="SIF_GetMessage Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>
								Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.  Place the incoming <code>SIF_Header/SIF_SourceId</code> and <code>SIF_Header/SIF_MsgId</code>
								in <code>SIF_OriginalSourceId</code> and <code>SIF_OriginalMsgId</code>,
								respectively.  If the Agent sending <code>SIF_GetMessage</code> is registered as a Pull-Mode Agent, go to step 3.
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>
								The Agent is a Push-Mode Agent and is not allowed to send <code>SIF_GetMessage</code>.
								Include a <code>SIF_Error/SIF_Category</code> of <code>5</code> (Registration) and a 
								<code>SIF_Error/SIF_Code</code> of <code>9</code> (Agent is registered in Push mode).
								Populate <code>SIF_Desc</code> and optionally <code>SIF_ExtendedDesc</code>
								as desired.  Return the <code>SIF_Ack</code> to the Agent.
							</td>
        <td>Message processing complete.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								If the recorded state of the Pull-Mode Agent is "asleep," change that state to "awake."
								Is there a message available in the Agent's message queue, subject to Selective Message Blocking?  If yes, go to step 5.
							</td>
        <td> </td>
      </tr>
      <tr>
        <td>4</td>
        <td>
								There is no message currently available for the Agent.
								Include a <code>SIF_Status/SIF_Code</code> of <code>9</code> (no messages available).
								Return the <code>SIF_Ack</code> to the Agent.
							</td>
        <td>Message processing complete.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>
								The next available message in the Agent's queue, subject to Selective Message Blocking, can be delivered (it will be removed from the queue later
								per successful handling of a <code>SIF_Ack</code> from the Pull-Mode Agent).  If <code>SIF_Security</code> is specified
								on the message and the connection from the Pull-Mode Agent does not meet the specified minimum encryption
								and/or authentication levels, or if the connection does not meet minimum encryption/authentication levels in
								the Zone, remove the message from the Agent's queue and return an appropriate <code>SIF_Error</code>.
								Otherwise include a <code>SIF_Status/SIF_Code</code> of <code>0</code> (success) and place
								the message in <code>SIF_Status/SIF_Data</code>.
							</td>
        <td>Message processing complete.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.18-1: SIF_GetMessage Handling</span>
    <a name="ZISMessageHandlingSIF_AckPushMode" />
    <h4>4.2.2.19 SIF_Ack (from a Push-Mode Agent)</h4>
    <p>
						A Push-Mode Agent is sending a final <code>SIF_Ack</code> to end Selective Message Blocking (SMB).
					</p>
    <a name="Table422191SIF_AckHandling" />
    <table title="SIF_Ack Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>3</code> (final <code>SIF_Ack</code>)?</td>
        <td>If yes, go to Step 3.</td>
      </tr>
      <tr>
        <td>2</td>
        <td>
          <p>The Agent has violated protocol.  End SMB if it has been invoked by the
								Agent and remove the blocked <code>SIF_Event</code> from the Agent's queue.
								Indicate <code>SIF_Error/SIF_Category</code> of <code>13</code> (SMB Error) and <code>SIF_Error/SIF_Code</code> 
								<code>3</code> (final <code>SIF_Ack</code> expected).
								</p>
          <p>
It is <span class="rfc2119">RECOMMENDED</span>
								that your ZIS log the error.  Your ZIS <span class="rfc2119">MAY</span> post a <code>SIF_LogEntry</code>
								 <code>Add</code> event with the same error category and code above, containing a copy of the <code>SIF_Header</code>
								of the message.
								</p>
        </td>
        <td>Return the <code>SIF_Ack</code> to the Agent.  Message handling complete (error).</td>
      </tr>
      <tr>
        <td>3</td>
        <td>
								Does <code>SIF_OriginalMsgId</code> match the <code>SIF_MsgId</code> for the <code>SIF_Event</code> that
								was blocked in SMB, if any?
							</td>
        <td>If yes, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>
          <p>The Agent has violated protocol. As there can be only one event blocked by SMB, end SMB for the agent
								and remove the blocked <code>SIF_Event</code> from the Agent's queue, if any.
								Indicate <code>SIF_Error/SIF_Category</code> of <code>13</code> (SMB Error) and <code>SIF_Error/SIF_Code</code> 
								<code>4</code> (incorrect <code>SIF_MsgId</code> in final <code>SIF_Ack</code>).
								</p>
          <p>
It is <span class="rfc2119">RECOMMENDED</span>
								that your ZIS log the error.  Your ZIS <span class="rfc2119">MAY</span> post a <code>SIF_LogEntry</code>
								 <code>Add</code> event with the same error category and code above, containing a copy of the <code>SIF_Header</code>
								of the message.
								</p>
        </td>
        <td>Return the <code>SIF_Ack</code> to the Agent.  Message handling complete (error).</td>
      </tr>
      <tr>
        <td>5</td>
        <td>SMB has been ended by the Agent.  Removed the blocked <code>SIF_Event</code> from the Agent's queue.
								Place <code>0</code> in <code>SIF_Status/SIF_Code</code>.</td>
        <td>
								Return the <code>SIF_Ack</code> to the Agent.  Message handling complete (success).</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.19-1: SIF_Ack Handling</span>
    <a name="ZISMessageHandlingSIF_AckPullMode" />
    <h4>4.2.2.20 SIF_Ack (from a Pull-Mode Agent)</h4>
    <p>
						A Pull-Mode Agent is acknowledging a message it has retrieved using <code>SIF_GetMessage</code>.  This typically
						leads to the message in question being removed from the Agent's queue.  The Agent may also invoke Selective Message Blocking when acknowledging
						an event, blocking delivery of subsequent <code>SIF_Event</code>s until Selective Message Blocking is ended by the Agent.
					</p>
    <a name="Table422201SIF_AckHandling" />
    <table title="SIF_Ack Handling">
      <thead>
        <tr>
          <td>Step</td>
          <td>Process</td>
          <td>Flow Control</td>
        </tr>
      </thead>
      <tr>
        <td>1</td>
        <td>Prepare a <a href="Infrastructure.html#SIF_Ack"><code>SIF_Ack</code></a> message with
								<a href="Infrastructure.html#SIF_Header"><code>SIF_Header</code></a> containing a new GUID in <code>SIF_MsgId</code>,
								your Zone ID in <code>SIF_SourceId</code> and the current time in <code>SIF_Timestamp</code>; other <code>SIF_Header</code>
								elements do not apply.</td>
        <td> </td>
      </tr>
      <tr>
        <td>2</td>
        <td>Is <code>SIF_Error</code> present?</td>
        <td>If yes, go to Step 14.</td>
      </tr>
      <tr>
        <td>3</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>1</code> (immediate <code>SIF_Ack</code>)?</td>
        <td>If no, go to Step 5.</td>
      </tr>
      <tr>
        <td>4</td>
        <td>If no message matches <code>SIF_OriginalMsgId</code>, set <code>SIF_Error/SIF_Category</code> 
							to <code>12</code> (Generic Message Handling) and <code>SIF_Error/SIF_Code</code> to <code>6</code>
							(no such message).  Otherwise remove the identified message from the Agent's queue and set <code>SIF_Status/SIF_Code</code>
							to <code>0</code>.</td>
        <td>Return <code>SIF_Ack</code>.  Message handling complete.</td>
      </tr>
      <tr>
        <td>5</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>2</code> (intermediate <code>SIF_Ack</code>)?</td>
        <td>If no, go to Step 7.</td>
      </tr>
      <tr>
        <td>6</td>
        <td>If no message matches <code>SIF_OriginalMsgId</code>, set <code>SIF_Error/SIF_Category</code> 
							to <code>12</code> (Generic Message Handling) and <code>SIF_Error/SIF_Code</code> to <code>6</code>
							(no such message).  If the message identified is not a <code>SIF_Event</code>, set <code>SIF_Category</code>
							to <code>13</code> (SMB Error) and <code>SIF_Code</code> to <code>2</code> (SMB can only be invoked
							on a <code>SIF_Event</code>).  Otherwise invoke SMB on the identified <code>SIF_Event</code>, persisting
							<code>SIF_OriginalMsgId</code>, and set <code>SIF_Status/SIF_Code</code>
							to <code>0</code>.  This event is blocked and all <code>SIF_Event</code>s are frozen.</td>
        <td>Return <code>SIF_Ack</code>.  Message handling complete.</td>
      </tr>
      <tr>
        <td>7</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>3</code> (final <code>SIF_Ack</code>)?</td>
        <td>If no, go to Step 9.</td>
      </tr>
      <tr>
        <td>8</td>
        <td>If SMB has not been invoked or the message identified by <code>SIF_OriginalMsgId</code> doesn't
							exist or doesn't match the <code>SIF_Event</code> blocked by SMB, set <code>SIF_Error/SIF_Category</code> 
							to <code>13</code> (SMB Error) and <code>SIF_Error/SIF_Code</code> to <code>4</code>
							(incorrect <code>SIF_MsgId</code> in final <code>SIF_Ack</code>).  (In the case of SMB having been invoked but the
							message not matching, end SMB, remove the message blocked by SMB from the Agent's queue and unfreeze
							delivery of events.)  Otherwise end SMB, remove the identified message from the Agent's
							queue and unfreeze delivery of events.  Set <code>SIF_Status/SIF_Code</code>
							to <code>0</code>.</td>
        <td>Return <code>SIF_Ack</code>.  Message handling complete.</td>
      </tr>
      <tr>
        <td>9</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>7</code> (already have this <code>SIF_MsgId</code> from you)?</td>
        <td>If no, go to Step 11.</td>
      </tr>
      <tr>
        <td>10</td>
        <td>The ZIS cannot correct this, as the <code>SIF_MsgId</code>
								originates from an Agent and can't be changed without other repercussions.  Remove the message from
								the Agent's queue.  Set <code>SIF_Status/SIF_Code</code> to <code>0</code>.</td>
        <td>Return <code>SIF_Ack</code>.  Message handling complete.</td>
      </tr>
      <tr>
        <td>11</td>
        <td>Is <code>SIF_Status/SIF_Code</code> <code>8</code> (receiver is sleeping)?</td>
        <td>If no, go to Step 13.</td>
      </tr>
      <tr>
        <td>12</td>
        <td>The Agent is stating it cannot process the message at this time; leave it as the next message to be delivered.  Set <code>SIF_Status/SIF_Code</code> to <code>0</code>.</td>
        <td>Return <code>SIF_Ack</code>.  Message handling complete.</td>
      </tr>
      <tr>
        <td>13</td>
        <td>
          <p>The Agent has violated protocol. 
								Indicate <code>SIF_Error/SIF_Category</code> of <code>12</code> (Generic Message Handling Error) 
								and <code>SIF_Error/SIF_Code</code> <code>5</code> (protocol error).
								of the message.
								</p>
        </td>
        <td>Return <code>SIF_Ack</code>.  Message handling complete.</td>
      </tr>
      <tr>
        <td>14</td>
        <td>
								The Agent has indicated a <a href="Infrastructure.html#SIF_Error"><code>SIF_Error</code></a>
								condition. See <a href="CodeSets.html#InfrastructureErrorCategoryType">Error Codes</a> with
								<code>SIF_Category</code> and <code>SIF_Code</code>, and examine <code>SIF_Desc</code> and <code>SIF_ExtendedDesc</code>,
								if included.  If <code>SIF_Category</code> does not indicate a transport error, remove the message from the Agent's
								queue.  Otherwise it remains the next message to be delivered.  Set <code>SIF_Status/SIF_Code</code>
							to <code>0</code>.</td>
        <td>Return <code>SIF_Ack</code>.  Message handling complete.</td>
      </tr>
    </table>
    <span class="caption">Table 4.2.2.20-1: SIF_Ack Handling</span>
    <div class="navigation" id="bottomnavigation">
      <hr />
      <a href="index.html">home</a>
      <a href="Architecture.html">previous</a>
      <a href="Infrastructure.html">next</a>
      <a href="index.html#contents">table of contents</a>
    </div><p align='center'><a href='http://validator.w3.org/check?uri=referer'><img src='http://www.w3.org/Icons/valid-xhtml10' alt='Valid XHTML 1.0 Transitional'/></a></p></body>
</html>